forked from mpusz/mp-units
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:
committed by
Ralph J. Steinhagen
parent
d09cef27c9
commit
1f27646d4c
@@ -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;
|
||||
|
Reference in New Issue
Block a user