diff --git a/src/core/include/mp-units/bits/representation_concepts.h b/src/core/include/mp-units/bits/representation_concepts.h index 503182ba..f25a0d9b 100644 --- a/src/core/include/mp-units/bits/representation_concepts.h +++ b/src/core/include/mp-units/bits/representation_concepts.h @@ -66,11 +66,12 @@ concept CastableNumber = CommonTypeWith && ScalableNumber -concept Scalable = CastableNumber || - (requires { typename T::value_type; } && CastableNumber && - ScalableNumber>) || - (requires { typename T::element_type; } && CastableNumber && - ScalableNumber>); +concept Scalable = + CastableNumber || + (requires { typename T::value_type; } && CastableNumber && + ScalableNumber>) || + (requires { typename T::element_type; } && CastableNumber> && + ScalableNumber, std::intmax_t>>); } // namespace detail diff --git a/src/core/include/mp-units/customization_points.h b/src/core/include/mp-units/customization_points.h index af099781..316d1d18 100644 --- a/src/core/include/mp-units/customization_points.h +++ b/src/core/include/mp-units/customization_points.h @@ -42,12 +42,14 @@ template inline constexpr bool treat_as_floating_point = std::is_floating_point_v; template - requires requires { typename Rep::value_type; } -inline constexpr bool treat_as_floating_point = treat_as_floating_point; - -template - requires requires { typename Rep::element_type; } -inline constexpr bool treat_as_floating_point = treat_as_floating_point; + requires requires { typename Rep::value_type; } || requires { typename Rep::element_type; } +inline constexpr bool treat_as_floating_point = requires { + typename Rep::value_type; + requires treat_as_floating_point; +} || requires { + typename Rep::element_type; + requires treat_as_floating_point>; +}; /** * @brief Specifies a type to have a scalar character