mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 21:24:27 +02:00
fix: quantity_spec compilation fixed
This commit is contained in:
@@ -121,7 +121,7 @@ struct quantity_spec_interface {
|
||||
(explicitly_convertible(std::remove_reference_t<Q>::quantity_spec, self))
|
||||
{
|
||||
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
|
||||
template<typename Self_ = Self, UnitOf<Self_{}> U>
|
||||
@@ -136,7 +136,7 @@ struct quantity_spec_interface {
|
||||
[[nodiscard]] constexpr Quantity auto operator()(Q&& q) const
|
||||
{
|
||||
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
|
||||
};
|
||||
@@ -313,7 +313,7 @@ struct quantity_spec<Self, QS, Args...> : std::remove_const_t<decltype(QS)> {
|
||||
[[nodiscard]] constexpr Quantity auto operator()(Q&& q) const
|
||||
{
|
||||
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
|
||||
};
|
||||
|
Reference in New Issue
Block a user