diff --git a/src/core/include/mp-units/framework/quantity_cast.h b/src/core/include/mp-units/framework/quantity_cast.h index 64d0154b..38e8aaf7 100644 --- a/src/core/include/mp-units/framework/quantity_cast.h +++ b/src/core/include/mp-units/framework/quantity_cast.h @@ -53,10 +53,10 @@ namespace mp_units { * @tparam ToQS a quantity specification to use for a target quantity */ template - requires Quantity> && (castable(Q::quantity_spec, ToQS)) + requires Quantity> && (castable(std::remove_reference_t::quantity_spec, ToQS)) [[nodiscard]] constexpr Quantity auto quantity_cast(Q&& q) { - return quantity{std::forward(q).numerical_value_is_an_implementation_detail_, make_reference(ToQS, Q::unit)}; + return quantity{std::forward(q).numerical_value_is_an_implementation_detail_, make_reference(ToQS, q.unit)}; } /** @@ -77,7 +77,7 @@ template * @tparam ToQS a quantity specification to use for a target quantity point */ template - requires QuantityPoint> && (castable(QP::quantity_spec, ToQS)) + requires QuantityPoint> && (castable(std::remove_reference_t::quantity_spec, ToQS)) [[nodiscard]] constexpr QuantityPoint auto quantity_cast(QP&& qp) { return QP{quantity_cast(std::forward(qp).quantity_from_origin_is_an_implementation_detail_),