diff --git a/src/core/include/mp-units/quantity_spec.h b/src/core/include/mp-units/quantity_spec.h index 0cb0f9957..def030c6c 100644 --- a/src/core/include/mp-units/quantity_spec.h +++ b/src/core/include/mp-units/quantity_spec.h @@ -121,7 +121,7 @@ struct quantity_spec_interface { (explicitly_convertible(std::remove_reference_t::quantity_spec, self)) { return quantity{std::forward(q).numerical_value_is_an_implementation_detail_, - reference::unit)>>{}}; + detail::make_reference(self, std::remove_cvref_t::unit)}; } #else template U> @@ -136,7 +136,7 @@ struct quantity_spec_interface { [[nodiscard]] constexpr Quantity auto operator()(Q&& q) const { return quantity{std::forward(q).numerical_value_is_an_implementation_detail_, - reference::unit)>>){}}; + detail::make_reference(Self{}, std::remove_cvref_t::unit)}; } #endif }; @@ -313,7 +313,7 @@ struct quantity_spec : std::remove_const_t { [[nodiscard]] constexpr Quantity auto operator()(Q&& q) const { return quantity{std::forward(q).numerical_value_is_an_implementation_detail_, - reference::unit> {}}; + detail::make_reference(Self{}, std::remove_cvref_t::unit)}; } #endif };