fix: quantity_spec compilation fixed

This commit is contained in:
Mateusz Pusz
2024-02-05 20:43:36 +01:00
parent b4c08bb8fe
commit 1663aa082f

View File

@@ -121,7 +121,7 @@ struct quantity_spec_interface {
(explicitly_convertible(std::remove_reference_t<Q>::quantity_spec, self)) (explicitly_convertible(std::remove_reference_t<Q>::quantity_spec, self))
{ {
return quantity{std::forward<Q>(q).numerical_value_is_an_implementation_detail_, return quantity{std::forward<Q>(q).numerical_value_is_an_implementation_detail_,
reference<Self, std::remove_const_t<decltype(std::remove_cvref_t<Q>::unit)>>{}}; detail::make_reference(self, std::remove_cvref_t<Q>::unit)};
} }
#else #else
template<typename Self_ = Self, UnitOf<Self_{}> U> template<typename Self_ = Self, UnitOf<Self_{}> U>
@@ -136,7 +136,7 @@ struct quantity_spec_interface {
[[nodiscard]] constexpr Quantity auto operator()(Q&& q) const [[nodiscard]] constexpr Quantity auto operator()(Q&& q) const
{ {
return quantity{std::forward<Q>(q).numerical_value_is_an_implementation_detail_, return quantity{std::forward<Q>(q).numerical_value_is_an_implementation_detail_,
reference<Self, std::remove_const_t<decltype(std::remove_cvref_t<Q>::unit)>>){}}; detail::make_reference(Self{}, std::remove_cvref_t<Q>::unit)};
} }
#endif #endif
}; };
@@ -313,7 +313,7 @@ struct quantity_spec<Self, QS, Args...> : std::remove_const_t<decltype(QS)> {
[[nodiscard]] constexpr Quantity auto operator()(Q&& q) const [[nodiscard]] constexpr Quantity auto operator()(Q&& q) const
{ {
return quantity{std::forward<Q>(q).numerical_value_is_an_implementation_detail_, return quantity{std::forward<Q>(q).numerical_value_is_an_implementation_detail_,
reference<Self{}, std::remove_cvref_t<Q>::unit> {}}; detail::make_reference(Self{}, std::remove_cvref_t<Q>::unit)};
} }
#endif #endif
}; };