diff --git a/src/core/include/mp-units/framework/quantity_spec.h b/src/core/include/mp-units/framework/quantity_spec.h index 3f4eb4d2..17e3cd96 100644 --- a/src/core/include/mp-units/framework/quantity_spec.h +++ b/src/core/include/mp-units/framework/quantity_spec.h @@ -432,19 +432,18 @@ namespace detail { template struct derived_quantity_spec_impl : #if MP_UNITS_API_NO_CRTP - detail::quantity_spec_interface, + quantity_spec_interface, #else - detail::quantity_spec_interface>, + quantity_spec_interface>, #endif - detail::expr_fractions { + expr_fractions { using _base_type_ = derived_quantity_spec_impl; - using _base_ = detail::expr_fractions; + using _base_ = expr_fractions; static constexpr Dimension auto dimension = - detail::expr_map(_base_{}); + expr_map(_base_{}); static constexpr quantity_character character = - detail::derived_quantity_character(typename _base_::_num_{}, typename _base_::_den_{}); + derived_quantity_character(typename _base_::_num_{}, typename _base_::_den_{}); }; } // namespace detail @@ -544,7 +543,7 @@ template template [[nodiscard]] consteval auto remove_kind(Q q) { - if constexpr (detail::QuantityKindSpec) + if constexpr (QuantityKindSpec) return Q::_quantity_spec_; else return q; @@ -623,7 +622,7 @@ template template [[nodiscard]] consteval int get_complexity(Q) { - if constexpr (detail::DerivedQuantitySpec) + if constexpr (DerivedQuantitySpec) return get_complexity(typename Q::_num_{}) + get_complexity(typename Q::_den_{}); else if constexpr (requires { Q::_equation_; }) return 1 + get_complexity(Q::_equation_); @@ -641,7 +640,7 @@ template else if constexpr (D2{} == dimension_one) return true; else - return detail::type_name() < detail::type_name(); + return type_name() < type_name(); } template rhs_compl) || (lhs_compl == rhs_compl && ingredients_dimension_less(Lhs::dimension, Rhs::dimension)) || (lhs_compl == rhs_compl && Lhs::dimension == Rhs::dimension && - detail::type_name() < detail::type_name())>{}; + type_name() < type_name())>{}; template using type_list_of_ingredients_less = expr_less; @@ -1460,10 +1459,10 @@ using to_kind = decltype(get_kind_tree_root(Q{})); #if MP_UNITS_API_NO_CRTP template -[[nodiscard]] consteval bool defined_as_kind(quantity_spec) +[[nodiscard]] consteval bool defined_as_kind_impl(quantity_spec) #else template -[[nodiscard]] consteval bool defined_as_kind(quantity_spec) +[[nodiscard]] consteval bool defined_as_kind_impl(quantity_spec) #endif { return contains(); @@ -1473,22 +1472,21 @@ template [[nodiscard]] consteval QuantitySpec auto get_kind_tree_root(Q q) { auto defined_as_kind = [](QQ qq) { - if constexpr (requires { detail::defined_as_kind(qq); }) - return detail::defined_as_kind(QQ{}); + if constexpr (requires { defined_as_kind_impl(qq); }) + return defined_as_kind_impl(QQ{}); else return false; }; // NOLINTBEGIN(bugprone-branch-clone) - if constexpr (detail::QuantityKindSpec) { + if constexpr (QuantityKindSpec) { return remove_kind(q); } else if constexpr (defined_as_kind(Q{})) { return q; } else if constexpr (requires { Q::_parent_; }) { return get_kind_tree_root(Q::_parent_); - } else if constexpr (detail::DerivedQuantitySpec) { - return detail::expr_map(q); + } else if constexpr (DerivedQuantitySpecSpecialization) { + return expr_map(q); } else { // root quantity return q;