diff --git a/src/core/include/mp-units/framework/unit.h b/src/core/include/mp-units/framework/unit.h index 0962f7dd..ffea5720 100644 --- a/src/core/include/mp-units/framework/unit.h +++ b/src/core/include/mp-units/framework/unit.h @@ -116,18 +116,13 @@ template [[nodiscard]] consteval auto get_canonical_unit_impl(T, const common_unit&); template -struct get_canonical_unit_result { - inline static constexpr auto value = get_canonical_unit_impl(U{}, U{}); -}; +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::value; -} +[[nodiscard]] consteval auto get_canonical_unit(Unit auto u) { return detail::get_canonical_unit_result; } namespace detail {