diff --git a/src/core/include/mp-units/framework/unit.h b/src/core/include/mp-units/framework/unit.h index ae0aae78..0eec635b 100644 --- a/src/core/include/mp-units/framework/unit.h +++ b/src/core/include/mp-units/framework/unit.h @@ -120,9 +120,12 @@ constexpr auto get_canonical_unit_result = get_canonical_unit_impl(U{}, U{}); } // namespace detail -// TODO this should really be in the `details` namespace but is used in `chrono.h` (a part of mp_units.systems) -// Even though it is not exported, it is visible to the other module via ADL -[[nodiscard]] consteval auto get_canonical_unit(Unit auto u) { return detail::get_canonical_unit_result; } +// TODO this should really be in the `details` namespace and not exported but is used in `chrono.h` +// (a part of mp_units.systems) +MP_UNITS_EXPORT [[nodiscard]] consteval auto get_canonical_unit(Unit auto u) +{ + return detail::get_canonical_unit_result; +} template requires(M != detail::unit_magnitude<>{} && M != mag<1>)