diff --git a/src/core/include/mp-units/framework/quantity_spec.h b/src/core/include/mp-units/framework/quantity_spec.h index a3efa568..e2fbefc0 100644 --- a/src/core/include/mp-units/framework/quantity_spec.h +++ b/src/core/include/mp-units/framework/quantity_spec.h @@ -520,38 +520,24 @@ struct is_dimensionless : std::true_type {}; */ namespace detail { -template -concept QuantitySpecWithNoSpecifiers = detail::NamedQuantitySpec || detail::DerivedQuantitySpec; - template [[nodiscard]] consteval QuantitySpec auto get_kind_tree_root(Q q); } // namespace detail +template + requires(!detail::QuantityKindSpec) && detail::SameQuantitySpec #if MP_UNITS_API_NO_CRTP -template - requires detail::QuantitySpecWithNoSpecifiers && detail::SameQuantitySpec struct kind_of_ final : Q::_base_type_ { - using _base_type_ = kind_of_; - static constexpr auto _quantity_spec_ = Q{}; -}; #else - -#if MP_UNITS_COMP_CLANG -template - requires detail::QuantitySpecWithNoSpecifiers && detail::SameQuantitySpec -#else -template - requires detail::SameQuantitySpec -#endif struct kind_of_ final : quantity_spec, Q{}>::_base_type_ { +#endif using _base_type_ = kind_of_; static constexpr auto _quantity_spec_ = Q{}; }; -#endif -MP_UNITS_EXPORT template - requires detail::SameQuantitySpec +MP_UNITS_EXPORT template + requires requires { typename kind_of_; } constexpr kind_of_ kind_of; namespace detail {