diff --git a/src/core/include/mp-units/framework/quantity_spec.h b/src/core/include/mp-units/framework/quantity_spec.h index 1731b57f..b2d1a80a 100644 --- a/src/core/include/mp-units/framework/quantity_spec.h +++ b/src/core/include/mp-units/framework/quantity_spec.h @@ -428,7 +428,7 @@ struct quantity_spec : detail::propagate_equation, detail } template, typename Self_ = Self> - requires detail::QuantitySpecExplicitlyConvertibleTo + requires(explicitly_convertible(Q::quantity_spec, Self_{})) [[nodiscard]] constexpr Quantity auto operator()(FwdQ&& q) const { return quantity{std::forward(q).numerical_value_is_an_implementation_detail_, @@ -469,12 +469,12 @@ struct quantity_spec : detail::propagate_equation, detail // clang-format on #if MP_UNITS_API_NO_CRTP template - requires(detail::QuantitySpecExplicitlyConvertibleTo) + requires(explicitly_convertible(Eq, QS)) struct quantity_spec : detail::quantity_spec_interface { #else template - requires(detail::QuantitySpecExplicitlyConvertibleTo) + requires(explicitly_convertible(Eq, QS)) struct quantity_spec : detail::quantity_spec_interface { #endif using _base_type_ = quantity_spec;