mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-29 18:07:16 +02:00
fix: module export added to get_canonical_unit
as a workaround
Resolves #706
This commit is contained in:
@ -120,9 +120,12 @@ constexpr auto get_canonical_unit_result = get_canonical_unit_impl(U{}, U{});
|
|||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
// TODO this should really be in the `details` namespace but is used in `chrono.h` (a part of mp_units.systems)
|
// TODO this should really be in the `details` namespace and not exported but is used in `chrono.h`
|
||||||
// Even though it is not exported, it is visible to the other module via ADL
|
// (a part of mp_units.systems)
|
||||||
[[nodiscard]] consteval auto get_canonical_unit(Unit auto u) { return detail::get_canonical_unit_result<decltype(u)>; }
|
MP_UNITS_EXPORT [[nodiscard]] consteval auto get_canonical_unit(Unit auto u)
|
||||||
|
{
|
||||||
|
return detail::get_canonical_unit_result<decltype(u)>;
|
||||||
|
}
|
||||||
|
|
||||||
template<UnitMagnitude auto M, Unit U>
|
template<UnitMagnitude auto M, Unit U>
|
||||||
requires(M != detail::unit_magnitude<>{} && M != mag<1>)
|
requires(M != detail::unit_magnitude<>{} && M != mag<1>)
|
||||||
|
Reference in New Issue
Block a user