mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 11:24:27 +02:00
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:
@@ -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