diff --git a/coord/traits.hpp b/coord/traits.hpp index 692d7743..00673f9a 100644 --- a/coord/traits.hpp +++ b/coord/traits.hpp @@ -114,7 +114,6 @@ namespace cruft { template constexpr auto has_scalar_op_v = has_scalar_op::value; - template struct is_coord : std::false_type { }; template struct is_coord : is_coord {}; @@ -229,6 +228,19 @@ namespace cruft { struct value_trait> { using value_type = T; }; + template + requires requires { + typename ValueT::value_type; + } + struct value_trait { + using value_type = typename ValueT::value_type; + }; + + template + requires std::is_arithmetic_v + struct value_trait { + using value_type = ValueT; + }; //------------------------------------------------------------------------- template