type_list
type_list.hSince:
20.39.5From:
C++11type_list
template <typename... Typelists>
struct type_listDescription
Defines a tuple of types, but unlike a tuple, does not contain any values.
Also defines a range of compile time algorithms for use with etl::type_list template meta-programming.
Valid for C++11 and above, except where specifically noted.
is_type_list
template <typename T>
struct is_type_listDescription
Check if a type is an etl::type_list.
Returnetl::true_type if T is an etl::type_list, otherwise etl::false_type.
template <typename T>
constexpr bool is_type_list_vReturntrue if T is an etl::type_list, otherwise false.
From: C++17
type_list_size
template <typename TTypes>
struct type_list_sizeDescription
‘value’ is defined as the number of types in the type_list.
template <typename... TTypes>
constexpr size_t type_list_size_vDefined as the number of types in the type_list.
From: C++17
type_list_type_at_index
template <typename TTypeList, size_t Index>
struct type_list_type_at_indexDescription
Defines type as the type found at Index in the type_list.
Static asserts if Index is out of range.
template <typename TTypeList, size_t Index>
type_list_type_at_index_tDescription
Defined as the type found at Index in the type_list.
Static asserts if Index is out of range.
type_list_index_of_type
template <typename TTypeList, typename T>
struct type_list_index_of_typeDescription
Defines an integral constant value that is the index of the first instance of T in the type_list.
If the type is not in the type_list, then defined as etl::type_list_npos.
Useful for type lists that do not contain duplicates, otherwise use type_list_indices_of_type.
Static asserts if TTypeList is not an etl::type_list.
template <typename TTypeList, typename T>
constexpr size_t type_list_index_of_type_vDescriptionvalue is defined as the index of the type.
From: C++17
type_list_indices_of_type
template <typename TTypeList, typename T>
struct type_list_indices_of_typeDescription
Defines an index_sequence of indices where T appears in the type_list.
If the type is not in the type_list, then defined as an empty index_sequence.
Useful for type lists that contain duplicates, otherwise use type_list_index_of_type.
Static asserts if TTypeList is not an etl::type_list.
template <typename TTypeList, typename T>
type_list_indices_of_type_tDescription
Defined as index_sequence of indices where T appears in the type_list.
If the type is not in the type_list, then defined as an empty index_sequence.
Useful for type lists that contain duplicates, otherwise use type_list_index_of_type.
Static asserts if TTypeList is not an etl::type_list.
type_list_contains
template <typename TTypeList, typename T>
struct type_list_containsDescription
Defines value as true if the type_list contains the specified type, otherwise false.
From: C++17
template <typename TTypeList, typename T>
constexpr bool type_list_contains_vDescription
Defined as true if the type_list contains the specified type, otherwise false.
type_list_has_duplicates_of
template <typename TTypeList, typename T>
struct type_list_has_duplicates_ofDescription
Defines value as true if the type_list has duplicates of the specified type, otherwise false.
template <typename TTypeList, typename T>
constexpr bool type_list_has_duplicates_of_vDefined as true if the type_list has duplicates of the specified type, otherwise false.
From: C++17
type_list_count_of
template <typename TTypeList, typename T>
struct type_list_count_ofDescription
Defines value that is the count of the number of times a type is in the type_list.
template <typename TTypeList, typename T>
constexpr size_t type_list_count_of_vDescription
Defined as the count of the number of times a type is in the type_list.
From: C++17
type_list_max_size
template <typename T>
struct type_list_max_size;Description
Defines value that is the maximum sizeof all types in the type_list.
If the type_list is empty, then defined as 0.
template <typename TTypeList>
constexpr size_t type_list_max_size_vDescription
Defined as the maximum sizeof all types in the type_list.
If the type_list is empty, then defined as 0.
From: C++17
type_list_max_alignment
template <typename T>
struct type_list_max_alignmentDescription
Defines value as the maximum alignment all types in the type_list.
If the type_list is empty, then defined as 1.
template <typename TTypeList>
constexpr size_t type_list_max_alignment_vDefined as the maximum alignment all types in the type_list.
If the type_list is empty, then defined as 1.
From: C++17
type_list_select
template <typename TTypeList, size_t... Indices>
struct type_list_selectDescription
Selects types from a given type_list, according to a list of indices.
Defines type as the modified type_list.
template <typename TTypeList, size_t... Indices>
type_list_select_tDescription
Selects types from a given type_list, according to a list of indices.
Defined as the modified type_list.
type_list_select_from_indexes
template <typename TTypeList, size_t... Indices>
type_list_select_from_indexesDescriptiontype_list_select_from_indexes is an alias of type_list_select to be more consistent with the naming of other type_list metafunctions.
Selects types from a given type_list, according to a list of indices.
Defines type as the modified type_list.
type_list_select_from_index_sequence
template <typename TTypeList, typename TIndexSequence>
struct type_list_select_from_index_sequenceDescription
Defines a modified type_list by selecting types from a given type_list, according to an index sequence.
Defines type as the modified type_list.
template <typename TTypeList, typename TIndexSequence>
type_list_select_from_index_sequence_ttype_list_select_common_types
template <typename... TypeLists>
struct type_list_select_common_typesDescription
Defines type as a modified type_list of all of the types that are common to all of the type_lists.
A type is included in the result if it is present in every type_list.
The result contains no duplicates.
template <typename... TypeLists>
type_list_select_common_types_tDescription
Defined as a modified type_list of all of the types that are common to all of the type_lists.
A type is included in the result if it is present in every type_list.
The result contains no duplicates.
type_list_select_not_common_types
template <typename... TypeLists>
struct type_list_select_not_common_typesDescription
Defines type as a modified type_list of all of the types that are not common to all of the type_lists.
A type is included in the result if it is not present in every type_list.
The result contains no duplicates.
template <typename... TypeLists>
type_list_select_not_common_types_tDescription
Defined as modified type_list of all of the types that are not common to all of the type_lists.
A type is included in the result if it is not present in every type_list.
The result contains no duplicates.
type_list_cat
template <typename... TTypes>
struct type_list_catDescription
Defines type as the concatenation of two or more type_lists.
Does not remove duplicates.
template <typename... TypeLists>
type_list_cat_tDescription
Defined as the concatenation of two or more type_lists.
Does not remove duplicates.
type_list_cat_unique
template <typename... TypeLists>
struct type_list_cat_uniqueDescription
Defines type as the concatenation of two or more type_lists.
Removes duplicates.
template <typename... TypeLists>
type_list_cat_unique_tDescription
Defined as the concatenation of two or more type_lists.
Removes duplicates.
type_list_push_front
template <typename T, typename... TTypes>
struct type_list_push_frontDescription
Add a type to the beginning of a type_list.
Defines type as the modified type_list.
template <typename TypeList, typename T>
type_list_push_front_tDescription
Add a type to the beginning of a type_list.
Defined as the modified type_list.
type_list_pop_front
template <typename TTypeList>
struct type_list_pop_frontDescription
Removes the first type from a type_list.
Defines type as the modified type_list.
template <typename TTypeList>
type_list_pop_front_tDescription
Removes the first type from a type_list.
Defined as the modified type_list.
type_list_push_back
template <typename T, typename... TTypes>
struct type_list_push_backDescription
Add a type to the end of a type_list.
Defines type as the modified type_list.
template <typename TypeList, typename T>
type_list_push_back_tDescription
Add a type to the end of a type_list.
Defined as the modified type_list.
type_list_pop_back
template <typename TTypeList>
struct type_list_pop_backDescription
Removes the last type from a type_list.
Defines type as the modified type_list.
template <typename TTypeList>
type_list_pop_back_tDescription
Removes the last type from a type_list.
Defined as the modified type_list.
type_list_insert
template <typename TTypeList, typename T, size_t Index>
struct type_list_insertDescription
Insert a type at an index in a type_list.
Inserts before the type currently at Index.
If Index == size of the type_list, the type is appended.
Defines type as the modified type_list.
template <typename TTypeList, typename T, size_t Index>
type_list_insert_tDescription
Insert a type at an index in a type_list.
Inserts before the type currently at Index.
If Index == size of the type_list, the type is appended.
Defined as the modified type_list
type_list_remove
template <typename TTypeList, size_t Index>
struct type_list_removeDescription
Remove a type at an index in a type_list.
Defines type as the modified type_list.
template <typename TTypeList, size_t Index>
type_list_remove_tDescription
Remove a type at an index in a type_list.
Defined as the modified type_list
type_list_remove_if
template <typename TTypeList, template <typename> class TPredicate>
struct type_list_remove_ifDescription
Remove types that satisfy a predicate from a type_list.
Predicate must be: template <typename T> struct Pred : etl::bool_constant<...> {};
Defines type as the modified type_list.
template <typename TTypeList, template <typename> class TPredicate>
type_list_remove_if_tDescription
Remove types that satisfy a predicate from a type_list.
Predicate must be: template <typename T> struct Pred : etl::bool_constant<...> {};
Defined as the modified type_list
type_list_unique
template <typename TTypeList>
struct type_list_uniqueDescription
Removes duplicate types from a given type_list, preserving the first occurrence.
Defines type as the modified type_list.
template <typename TTypeList>
type_list_unique_tDescription
Removes duplicate types from a given type_list, preserving the first occurrence.
Defined as the modified type_list
type_list_is_unique
template <typename TTypeList>
struct type_list_is_uniqueDescription
Checks that all of the types in a type_list are unique.
Inherits from etl::true_type or etl::false_type.
template <typename TTypeList>
constexpr bool type_list_is_unique_vDescription
Checks that all of the types in a type_list are unique.
Defined as true or false.
From: C++17
type_list_is_empty
template <typename T>
struct type_list_is_emptyDescription
Checks if the type_list is empty.
Inherits from etl::true_type or etl::false_type.
template <typename... TTypes>
constexpr bool type_list_is_empty_vDescription
Checks if the type_list is empty.
Defined as true or false.
From: C++17
type_list_all_of
template <typename TTypeList, template <typename> class TPredicate>
struct type_list_all_of;Description
Checks that all types in a type_list satisfy a unary predicate.
Predicate must be: template <typename T> struct Pred : etl::bool_constant<...> {};
Inherits from etl::true_type or etl::false_type.
template <typename TTypeList, template <typename> class TPredicate>
constexpr bool type_list_all_of_vDescription
Checks that all types in a type_list satisfy a unary predicate.
Predicate must be: template <typename T> struct Pred : etl::bool_constant<...> {};
Defined true or false.
From: C++17
type_list_any_of
template <typename TTypeList, template <typename> class TPredicate>
struct type_list_any_ofDescription
Checks that any type in a type_list satisfies a unary predicate.
Predicate must be: template <typename T> struct Pred : etl::bool_constant<...> {};
Inherits from etl::true_type or etl::false_type.
template <typename TTypeList, template <typename> class TPredicate>
constexpr bool type_list_any_of_vDescription
Checks that any type in a type_list satisfies a unary predicate.
Predicate must be: template <typename T> struct Pred : etl::bool_constant<...> {};
Defined as true or false.
From: C++17
type_list_none_of
template <typename TTypeList, template <typename> class TPredicate>
struct type_list_none_ofDescription
Checks that no types in a type_list satisfy a unary predicate.
Predicate must be: template <typename T> struct Pred : etl::bool_constant<...> {};
Inherits from etl::true_type or etl::false_type.
template <typename TTypeList, template <typename> class TPredicate>
constexpr bool type_list_none_of_vDescription
Checks that no types in a type_list satisfy a unary predicate.
Predicate must be: template <typename T> struct Pred : etl::bool_constant<...> {};
Defined as true or false.
From: C++17
type_lists_are_convertible
template <typename TFromList, typename TToList>
struct type_lists_are_convertibleDescription
Checks that two type lists are convertible.
Static asserts if the type lists are not the same length.
Inherits from etl::true_type or etl::false_type.
template <typename TFromList, typename TToList>
constexpr bool type_lists_are_convertible_vDescription
Checks that two type lists are convertible.
Static asserts if the type lists are not the same length.
Defined as true or false.
From: C++17
type_list_is_sorted
template <typename TTypeList, template <typename, typename> class TCompare>
struct type_list_is_sortedDescription
Checks if a type_list is sorted according to TCompare.
Static asserts if TTypeList is not an etl::type_list.
Comparator must be: template <typename A, typename B> struct Compare : etl::bool_constant<…> {};
Inherits from etl::true_type or etl::false_type.
template <typename TTypeList, template <typename, typename> class TCompare>
constexpr bool type_list_is_sorted_vDescription
Checks if a type_list is sorted according to TCompare.
Static asserts if TTypeList is not an etl::type_list.
Comparator must be: template <typename A, typename B> struct Compare : etl::bool_constant<…> {};
Defined as true or false.
From: C++17
type_list_insert_sorted
template <typename TTypeList, typename T, template <typename, typename> class TCompare>
struct type_list_insert_sortedDescription
Insert T into the correct position in the sorted list, as determined by TCompare.
Static asserts if TTypeList is not sorted according to TCompare.
Comparator must be: template <typename A, typename B> struct Compare : etl::bool_constant<...> {};
Defines type as the modified type_list.
template <typename TTypeList, typename T, template <typename, typename> class TCompare>
type_list_insert_sorted_tDescription
Insert T into the correct position in the sorted list, as determined by TCompare.
Static asserts if TTypeList is not sorted according to TCompare.
Comparator must be: template <typename A, typename B> struct Compare : etl::bool_constant<...> {};
Defined as the modified type_list.
type_list_sort
template <typename TTypeList, template <typename, typename> class TCompare>
struct type_list_sortDescriptionetl::type_list sorting by a user supplied type comparator.
Comparator must be: template <typename A, typename B> struct Compare : etl::bool_constant<...> {};
Defines type as the modified type_list.
template <typename TTypeList, template <typename, typename> class TCompare>
type_list_sort_tDescriptionetl::type_list sorting by a user supplied type comparator.
Comparator must be: template <typename A, typename B> struct Compare : etl::bool_constant<...> {};
Defined as the modified type_list.
type_list_in_all_lists
template <typename T, typename... TypeLists>
struct type_list_in_all_listsDescription
Checks if a type T is present in all provided type_lists.
Inherits from etl::true_type if T is in every list, otherwise etl::false_type.
Since: 20.48.0
template <typename T, typename... TypeLists>
constexpr bool type_list_in_all_lists_vDescription
Checks if a type T is present in all provided type_lists.
Defined as true if T is in every list, otherwise false.
Since: 20.48.0
From: C++17
type_list_in_any_list
template <typename T, typename... TypeLists>
struct type_list_in_any_listDescription
Checks if a type T is present in at least one of the provided type_lists.
Inherits from etl::true_type if T is in any list, otherwise etl::false_type.
Since: 20.48.0
template <typename T, typename... TypeLists>
constexpr bool type_list_in_any_list_vDescription
Checks if a type T is present in at least one of the provided type_lists.
Defined as true if T is in any list, otherwise false.
Since: 20.48.0
From: C++17
type_list_in_no_lists
template <typename T, typename... TypeLists>
struct type_list_in_no_listsDescription
Checks if a type T is present none of the provided type_lists.
Inherits from etl::true_type if T is in no list, otherwise etl::false_type.
Since: 20.48.0
template <typename T, typename... TypeLists>
constexpr bool type_list_in_no_lists_vDescription
Checks if a type T is present in none of the provided type_lists.
Defined as true if T is in no list, otherwise false.
Since: 20.48.0
From: C++17
type_list_remove_from
template <typename... TypeLists>
struct type_list_remove_fromDescription
Defines a modified type_list that contains the types in the first list that are not in any of the following lists.
Does not remove duplicates.type is defined as the modified type_list.
template <typename... TypeLists>
type_list_remove_from_tDescription
Defines a modified type_list that contains the types in the first list that are not in any of the following lists.
Does not remove duplicates.
Defined as the modified type_list.