From 95ac869522496d0c9e4689f3066ae146187f5253 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Sun, 27 Jun 2021 11:31:54 +0200 Subject: [PATCH] extended is_quantity to support quantity-derived classes N.B. inheritance is preferred to composition/delegate class to avoid duplication and also inherent the various required operators ('+','-',..., '+=', ...) for details see discussion #271 --- src/core/include/units/bits/basic_concepts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/include/units/bits/basic_concepts.h b/src/core/include/units/bits/basic_concepts.h index 4ec56115..94425df1 100644 --- a/src/core/include/units/bits/basic_concepts.h +++ b/src/core/include/units/bits/basic_concepts.h @@ -269,7 +269,7 @@ concept Reference = detail::is_reference; namespace detail { template -inline constexpr bool is_quantity = false; +inline constexpr bool is_quantity = requires { typename T::dimension; typename T::unit; typename T::rep;}; template inline constexpr bool is_quantity_point = false;