Skip to content

Commit

Permalink
feat: proper constraints for kind_of
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Nov 29, 2024
1 parent b5f54a6 commit 19a2019
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/include/mp-units/framework/quantity_spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ template<QuantitySpec Q>

} // namespace detail

template<typename Q>
template<QuantitySpec Q>
requires(!detail::QuantityKindSpec<Q>) && (detail::get_kind_tree_root(Q{}) == Q{})
#if MP_UNITS_API_NO_CRTP
struct kind_of_<Q> final : Q::_base_type_ {
Expand All @@ -510,7 +510,7 @@ struct kind_of_<Q> final : quantity_spec<kind_of_<Q>, Q{}>::_base_type_ {
static constexpr auto _quantity_spec_ = Q{};
};

MP_UNITS_EXPORT template<auto Q>
MP_UNITS_EXPORT template<QuantitySpec auto Q>
requires requires { typename kind_of_<decltype(Q)>; }
constexpr kind_of_<MP_UNITS_REMOVE_CONST(decltype(Q))> kind_of;

Expand Down

0 comments on commit 19a2019

Please sign in to comment.