diff --git a/src/core/include/mp-units/framework/quantity_spec.h b/src/core/include/mp-units/framework/quantity_spec.h index c4497681..e7f1b7c2 100644 --- a/src/core/include/mp-units/framework/quantity_spec.h +++ b/src/core/include/mp-units/framework/quantity_spec.h @@ -499,7 +499,7 @@ template } // namespace detail -template +template requires(!detail::QuantityKindSpec) && (detail::get_kind_tree_root(Q{}) == Q{}) #if MP_UNITS_API_NO_CRTP struct kind_of_ final : Q::_base_type_ { @@ -510,7 +510,7 @@ struct kind_of_ final : quantity_spec, Q{}>::_base_type_ { static constexpr auto _quantity_spec_ = Q{}; }; -MP_UNITS_EXPORT template +MP_UNITS_EXPORT template requires requires { typename kind_of_; } constexpr kind_of_ kind_of;