extended is_quantity<T> 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
This commit is contained in:
Mateusz Pusz committed 2021-06-29 20:31:06 +02:00
1 parent ae752da50e
commit 95ac869522
1 file changed
+1 -1
+1 -1
View File
@@ -269,7 +269,7 @@ concept Reference = detail::is_reference<T>;
namespace detail {
template<typename T>
inline constexpr bool is_quantity = false;
inline constexpr bool is_quantity = requires { typename T::dimension; typename T::unit; typename T::rep;};
template<typename T>
inline constexpr bool is_quantity_point = false;