diff --git a/src/core/include/mp-units/framework/quantity_cast.h b/src/core/include/mp-units/framework/quantity_cast.h index 018317eb1..276073e55 100644 --- a/src/core/include/mp-units/framework/quantity_cast.h +++ b/src/core/include/mp-units/framework/quantity_cast.h @@ -58,7 +58,8 @@ namespace mp_units { * @tparam ToQS a quantity specification to use for a target quantity */ template> - requires(castable(Q::quantity_spec, ToQS)) && (MP_UNITS_WEAK_UNIT_OF(MP_UNITS_NONCONST_TYPE(Q::unit), ToQS)) + requires(castable(Q::quantity_spec, ToQS)) && + requires { typename quantity; } [[nodiscard]] constexpr Quantity auto quantity_cast(FwdQ&& q) { return quantity{std::forward(q).numerical_value_is_an_implementation_detail_, make_reference(ToQS, Q::unit)};