fix: get_quantity_spec compilation fixed on MSVC

This commit is contained in:
Mateusz Pusz
2024-11-29 13:19:25 +01:00
parent f0885f8027
commit 4280e54081
2 changed files with 5 additions and 3 deletions

View File

@@ -49,9 +49,10 @@ using reference_t = reference<MP_UNITS_REMOVE_CONST(decltype(Q)), MP_UNITS_REMOV
MP_UNITS_EXPORT_BEGIN MP_UNITS_EXPORT_BEGIN
[[nodiscard]] consteval QuantitySpec auto get_quantity_spec(AssociatedUnit auto u) template<AssociatedUnit U>
[[nodiscard]] consteval QuantitySpec auto get_quantity_spec(U)
{ {
return kind_of<detail::get_associated_quantity(u)>; return kind_of<detail::get_associated_quantity(U{})>;
} }
/** /**

View File

@@ -34,7 +34,8 @@ struct reference;
MP_UNITS_EXPORT_BEGIN MP_UNITS_EXPORT_BEGIN
[[nodiscard]] consteval QuantitySpec auto get_quantity_spec(AssociatedUnit auto u); template<AssociatedUnit U>
[[nodiscard]] consteval QuantitySpec auto get_quantity_spec(U);
template<typename Q, typename U> template<typename Q, typename U>
[[nodiscard]] consteval QuantitySpec auto get_quantity_spec(reference<Q, U>) [[nodiscard]] consteval QuantitySpec auto get_quantity_spec(reference<Q, U>)