Skip to content

Commit

Permalink
fix: quantity_spec compilation fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Feb 5, 2024
1 parent b4c08bb commit 1663aa0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/include/mp-units/quantity_spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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
};
Expand Down Expand Up @@ -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
};
Expand Down

0 comments on commit 1663aa0

Please sign in to comment.