diff --git a/src/core/include/mp_units/bits/quantity_cast.h b/src/core/include/mp_units/bits/quantity_cast.h index 11a19d39..8ad945fd 100644 --- a/src/core/include/mp_units/bits/quantity_cast.h +++ b/src/core/include/mp_units/bits/quantity_cast.h @@ -56,7 +56,7 @@ class quantity; * @tparam ToQS a quantity specification to use for a target quantity */ template - requires Quantity> && castable_to(get_quantity_spec(Q::reference), ToQS) + requires Quantity> && (castable_to(std::remove_cvref_t::quantity_spec, ToQS)) [[nodiscard]] constexpr Quantity auto quantity_cast(Q&& q) { constexpr reference::unit> r;