10 template<
template<
typename...>
class Base>
14 template<
typename... T>
15 static std::true_type
check(Base<T...>
const volatile &);
17 static std::false_type
check(...);
28 template<
typename T,
template<
typename...>
class Base>
37 template<
typename T,
typename Base>
40 return std::is_base_of_v<Base, T>;
49 template<
typename T,
typename... Base>
50 using enable_for_t = std::enable_if_t<(... || (std::is_same_v<T, Base> || derives_from<T, Base>())),
int>;
58 template<
typename T,
template<
typename...>
class... Base>
80 constexpr
auto operator()(T && v)
const noexcept -> decltype(std::forward<T>(v))
82 return std::forward<T>(v);
92 static_assert(std::is_enum_v<T>,
"This is needed before C++20.");
93 return static_cast<std::underlying_type_t<T>
>(v);