mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 21:24:27 +02:00
fix: clang compilation changes for quantity_cast
This commit is contained in:
@@ -51,9 +51,9 @@ template<QuantitySpec auto ToQS, typename Q>
|
|||||||
{
|
{
|
||||||
if constexpr (detail::QuantityKindSpec<std::remove_const_t<decltype(ToQS)>> &&
|
if constexpr (detail::QuantityKindSpec<std::remove_const_t<decltype(ToQS)>> &&
|
||||||
AssociatedUnit<std::remove_const_t<decltype(Q::unit)>>)
|
AssociatedUnit<std::remove_const_t<decltype(Q::unit)>>)
|
||||||
return make_quantity<q.unit>(std::forward<Q>(q).value());
|
return make_quantity<Q::unit>(std::forward<Q>(q).value());
|
||||||
else
|
else
|
||||||
return make_quantity<reference<ToQS, q.unit>{}>(std::forward<Q>(q).value());
|
return make_quantity<reference<ToQS, Q::unit>{}>(std::forward<Q>(q).value());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace mp_units
|
} // namespace mp_units
|
||||||
|
Reference in New Issue
Block a user