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
2021-06-27 11:31:54 +02:00
parent ae752da50e
commit 95ac869522

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;