65 template <
class L,
template <
class...>
class U>
80 template <
template <
class...>
class L,
template <
class...>
class U,
class... T>
81 requires std::is_same_v<L<T...>, U<T...>>
101 template <
class T,
template <
class...>
class U>
121 template <
class... T>
147 template <
class... Ts,
class... Us>
173 template <
class... Ts,
class... Us>
196 template <
class TypeList,
class... Us>
215 template <
class... T>
236 template <
typename TList>
241 template <
class From,
template <
class...>
class To>
244 template <
template <
class...>
class From,
template <
class...>
class To,
class... T>
267 template <
class From,
template <
class...>
class To>
285 template <
template <
class...>
class W,
class T>
304 template <
template <
class>
class P,
class T>
306 { P<T>::value } -> std::convertible_to<bool>;
327 template<
class P,
class T >
337 {
predicate(std::type_identity_t<T>{}) } -> std::convertible_to<bool>;
352 template <
class T,
template <
class>
class P>
370 template <
class T, callable_type_predicate<T> P>
373 if constexpr (
requires(std::decay_t<P> p) {
381 return predicate(std::type_identity_t<T>{});
397 template <
template <
class...>
class W,
class X>
401 return std::same_as<T, X>;
406 template <
template <
class>
class P>
409 template <
template <
class...>
class W,
class T>
419 template <
template <
class>
class P>
448 template <
class Predicate,
template <
class...>
class L,
class... T>
449 requires any_typelist<L<T...>> and (callable_type_predicate<Predicate, T> && ...)
450 [[nodiscard]]
consteval bool any_of(L<T...>, [[maybe_unused]] Predicate
predicate = {})
469 template <
template <
class>
class Predicate,
template <
class...>
class L,
class... T>
470 requires any_typelist<L<T...>> and (ct_type_predicate<Predicate, T> && ...)
471 [[nodiscard]]
consteval bool any_of(L<T...> list)
490 template <
class Predicate,
template <
class...>
class L,
class... T>
491 requires any_typelist<L<T...>> and (callable_type_predicate<Predicate, T> && ...)
511 template <
template <
class>
class Predicate,
template <
class...>
class L,
class... T>
512 requires any_typelist<L<T...>> and (ct_type_predicate<Predicate, T> && ...)
513 [[nodiscard]]
consteval bool all_of(L<T...> list)
533 template <
class Predicate,
template <
class...>
class L,
class... T>
534 requires any_typelist<L<T...>> and (callable_type_predicate<Predicate, T> && ...)
538 auto check = [&](
bool match_success)
570 template <
template <
class>
class Predicate,
template <
class...>
class L,
class... T>
571 requires any_typelist<L<T...>> and (ct_type_predicate<Predicate, T> && ...)
572 [[nodiscard]]
consteval std::size_t
find_if(L<T...> list)
589 template <
class TypeToFind, any_typelist L>
590 [[nodiscard]]
consteval std::size_t
find(L list)
597 template <
class L,
class T>
600 template <
template <
class...>
class L,
class T>
605 template <
template <
class...>
class L,
class T,
class... U>
610 template <
template <
class...>
class L,
class V,
class... U,
class T>
632 template <any_typelist L,
class V>
640 template <
template <
class...>
class F,
class... L>
643 static_assert(
dependent_false<L...>::value,
"transform can apply to typelist-like types only");
646 template <
template <
class...>
class F,
template <
class...>
class L,
class... T>
652 template <
template <
class...>
class F,
template <
class...>
class L1,
class... T1,
template <
class...>
class L2,
class... T2>
681 template <
template <
class>
class F,
class... L>
686 template <
class S1,
class S2>
689 template <
template <
class...>
class L,
class... T>
695 template <
template <
class...>
class L,
class... T,
class U,
class... V>
721 template <
class L1,
class L2>
729 template <
template <
class...>
class L,
class... T>
777 template <
typename T,
bool is_const>
780 using type = std::conditional_t<is_const, const T, T>;
789 template <
typename T,
bool is_const>
792 using type = std::conditional_t<is_const, const T&, T&>;
806 template <
class T,
bool is_const>
840 && std::same_as<iter_const_reference_t<T>, std::iter_reference_t<T>>;
887#if defined(_MSC_VER) && !defined(__clang__)
890 __builtin_unreachable();
901 template <
class BoolRange>
903 && std::convertible_to<std::ranges::range_value_t<BoolRange>,
bool>;
916 concept boolean_like = std::is_assignable_v<std::add_lvalue_reference_t<std::decay_t<T>>,
bool>
917 and
requires {
static_cast<bool>(std::declval<T>()); };
930 template <
class From,
class To>
931 concept convertible_ranges = std::convertible_to<std::ranges::range_value_t<From>, std::ranges::range_value_t<To>>;
940 template <
typename T>
950 template <
typename T>
952 || std::derived_from<T, std::unique_ptr<typename T::element_type>>;
961 template <
typename T>
971 template <
typename T>
973 || std::derived_from<T, std::shared_ptr<typename T::element_type>>;
982 template <
typename T>
992 template <
typename T>
1003 concept testable =
requires(T t) { t ? true :
false; };
1017 template <
typename T,
typename Y,
template <
typename>
typename Qualifier>
1031 template <
class CLS,
class... ARGS>
1042 template <
class CLS>
1056 template <
class CLS,
class T>
1059 static constexpr bool value = !std::is_same_v<CLS, std::remove_cvref_t<T>>;
1068 template <
class CLS,
class... ARGS>
1083 template <
typename I,
typename T>
1085 && std::same_as<typename std::iterator_traits<I>::value_type, T>;
1100 concept char_like = std::same_as<T, char> || std::same_as<T, std::byte> || std::same_as<T, uint8_t>;
1112 template <
typename T>
1114 typename std::remove_cvref_t<T>::value_type;
1115 requires std::same_as<
1116 std::array<typename std::remove_cvref_t<T>::value_type, std::tuple_size<std::remove_cvref_t<T>>::value>,
1117 std::remove_cvref_t<T>>;
1125 template <
class T,
class U>
1127 const std::remove_reference_t<T>& t,
1128 const std::remove_reference_t<U>& u
1130 { t == u } -> std::convertible_to<bool>;
1131 { t != u } -> std::convertible_to<bool>;
1132 { u == t } -> std::convertible_to<bool>;
1133 { u != t } -> std::convertible_to<bool>;
Concept for matching qualifier requirements.
Concept that matches any typelist instantiation.
Concept for ranges whose elements are convertible to bool.
Concept for boolean-like types.
Concept for callable type predicates.
Concept for character-like types.
Concept for constant iterators.
Concept for constant ranges.
Concept for convertible range types.
Concept for compile-time type predicates.
Concept for iterators of a specific value type.
Concept for shared_ptr or derived types.
Concept for shared_ptr instances.
Concept for smart pointers and derived types.
Concept for any smart pointer type.
Concept for std::array types.
Concept for testable types in boolean contexts.
Concept for template types that can wrap a single type.
Concept for unique_ptr or derived types.
Concept for unique_ptr instances.
consteval bool all_of(L< T... >, Predicate predicate)
Checks if all types in the typelist satisfy the predicate.
consteval bool any_of(L< T... >, Predicate predicate={})
Checks if at least one type in the typelist satisfies the predicate.
consteval bool evaluate(P< T >)
Evaluates a compile-time template predicate.
decltype(append(TypeList{}, Us{}...)) append_t
Type alias for appending types or typelists to a given typelist.
std::common_reference_t< const std::iter_value_t< T > &&, std::iter_reference_t< T > > iter_const_reference_t
Computes the const reference type of an iterator.
consteval std::size_t find_if(L< T... >, Predicate predicate)
Finds the index of the first type satisfying the predicate.
constexpr std::size_t size(typelist< T... >={})
Gets the count of types contained in a typelist.
consteval auto append(typelist< Ts... >, Us...)
Appends individual types to a typelist.
consteval auto as_predicate()
constexpr bool excludes_copy_and_move_ctor_v
Convenience variable template for excludes_copy_and_move_ctor.
typename impl::merge_set_impl< L1, L2 >::type merge_set
Generates the union of two typelists, removing duplicates.
constexpr bool is_type_instance_of_v
Variable template for convenient access to is_type_instance_of.
typename impl::unique_impl< L >::type unique
Removes all duplicated types in the given typelist Example: unique<typelist<int, float,...
void unreachable()
Invokes undefined behavior for optimization purposes.
typename constify< T, is_const >::type constify_t
Convenience alias for constify.
typename impl::rename_impl< From, To >::type rename
Changes the template type of a type list.
consteval bool contains()
Checks if a typelist contains a specific type.
consteval std::size_t find(L list)
Finds the index of a specific type in the typelist.
typename add_const_lvalue_reference< T >::type add_const_lvalue_reference_t
Convenience alias for add_const_lvalue_reference.
typename impl::transform_impl< F, L... >::type transform
Applies a metafunction to each element of typelists.
Adds const and lvalue reference to a type.
std::conditional_t< is_const, const T &, T & > type
Conditionally adds const to a type.
std::conditional_t< is_const, const T, T > type
consteval bool operator()(W< T >) const
Workaround to replace static_assert(false) in template code.
static constexpr bool value
static constexpr bool value
Helper to exclude copy and move constructors from variadic templates.
static constexpr bool value
typename merge_set_impl< first_arg, L< V... > >::type type
std::conditional_t< contains< L< T... >, U >(), L< T... >, L< T..., U > > first_arg
merge_set< L<>, L< T... > > type
Type trait to check if a type is an instantiation of a template.
Compile-time type predicate: true if the evaluated type is the same as T.
consteval bool operator()(W< X >) const
A sequence of types used for metaprogramming operations.