diff --git a/src/core/include/units/unit.h b/src/core/include/units/unit.h index f5d14220..c429f837 100644 --- a/src/core/include/units/unit.h +++ b/src/core/include/units/unit.h @@ -126,7 +126,7 @@ struct prefixed_unit : downcast_dispatch -struct derived_unit : downcast_dispatch> {}; +struct derived_unit : downcast_dispatch(), Child>> {}; /** * @brief A unit with a deduced ratio and symbol @@ -195,8 +195,8 @@ namespace detail { template void is_named_impl(const volatile named_unit*); -template -void is_named_impl(const volatile named_scaled_unit*); +template +void is_named_impl(const volatile named_scaled_unit*); template void is_named_impl(const volatile prefixed_unit*); @@ -213,8 +213,8 @@ inline constexpr bool is_named = requires(U * u) { is_named_impl(u); }; template void can_be_prefixed_impl(const volatile named_unit*); -template -void can_be_prefixed_impl(const volatile named_scaled_unit*); +template +void can_be_prefixed_impl(const volatile named_scaled_unit*); template void can_be_prefixed_impl(const volatile alias_unit*); @@ -222,8 +222,8 @@ void can_be_prefixed_impl(const volatile alias_unit*); template inline constexpr bool can_be_prefixed = requires(U * u) { can_be_prefixed_impl(u); }; -template -inline constexpr bool can_be_prefixed> = can_be_prefixed; +template +inline constexpr bool can_be_prefixed> = can_be_prefixed; } // namespace detail diff --git a/src/systems/si-fps/include/units/isq/si/fps/length.h b/src/systems/si-fps/include/units/isq/si/fps/length.h index 35f51d7f..04a9e930 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/length.h +++ b/src/systems/si-fps/include/units/isq/si/fps/length.h @@ -39,6 +39,7 @@ using si::international::fathom; using si::international::foot; using si::international::inch; using si::international::mil; +using si::international::mile; using si::international::thou; using si::international::yard; @@ -47,8 +48,6 @@ struct thousandth : alias_unit {}; struct kiloyard : prefixed_unit {}; -struct mile : named_scaled_unit(), foot> {}; - struct nautical_mile : named_scaled_unit(), yard> {}; struct dim_length : isq::dim_length {}; diff --git a/test/unit_test/runtime/fmt_units_test.cpp b/test/unit_test/runtime/fmt_units_test.cpp index 22c04fe2..58531174 100644 --- a/test/unit_test/runtime/fmt_units_test.cpp +++ b/test/unit_test/runtime/fmt_units_test.cpp @@ -66,7 +66,7 @@ TEST_CASE("std::format on synthesized unit symbols", "[text][fmt]") CHECK(STD_FMT::format("{}", 1_q_fathom_us) == "1 fathom(us)"); CHECK(STD_FMT::format("{}", 1_q_mi) == "1 mi"); CHECK(STD_FMT::format("{}", 1_q_mi_us) == "1 mi(us)"); - CHECK(STD_FMT::format("{}", 1_q_naut_mi) == "1 nmi"); + CHECK(STD_FMT::format("{}", 1_q_naut_mi) == "1 mi(naut)"); CHECK(STD_FMT::format("{}", 1_q_ch) == "1 ch"); CHECK(STD_FMT::format("{}", 1_q_rd) == "1 rd"); CHECK(STD_FMT::format("{}", 1_q_thou) == "1 thou");