diff --git a/src/include/units/concepts.h b/src/include/units/concepts.h index 7e08fbb1..0cdb8bdb 100644 --- a/src/include/units/concepts.h +++ b/src/include/units/concepts.h @@ -50,14 +50,8 @@ namespace detail { template struct prefix_base; -struct is_derived_from_prefix_base_impl { - template - static constexpr std::true_type check_base(const prefix_base&); - static constexpr std::false_type check_base(...); -}; - -template -inline constexpr bool is_derived_from_prefix_base = decltype(is_derived_from_prefix_base_impl::check_base(std::declval()))::value; +template +void to_prefix_base(const volatile prefix_base*); } // namespace detail @@ -67,7 +61,7 @@ inline constexpr bool is_derived_from_prefix_base = decltype(is_derived_from_pre * Satisfied by all specializations of `prefix`. */ template -concept Prefix = detail::is_derived_from_prefix_base; +concept Prefix = requires(const volatile T* t) { detail::to_prefix_base(t); }; /** * @brief A concept matching unit's ratio