koutil
Loading...
Searching...
No Matches
koutil::type::detail Namespace Reference

Classes

struct  types_get_impl
 Implementation for getting a type by index in a types list. More...
 
struct  types_get_impl< types< Types... >, I >
 Specialization for getting a type by index in a types list. More...
 
struct  types_get_impl< types<>, I >
 
struct  types_index_of
 Structure to get the index of a type in a types list. More...
 
struct  types_index_of< T, types< Types... >, N >
 Specialization to get the index of a type in a types list. More...
 
struct  types_remove
 
struct  types_remove< types< Types... >, Type >
 
struct  types_remove< types<>, Type >
 
struct  types_remove_impl
 
struct  types_remove_impl< Search, Type >
 
struct  types_to_arrays
 Implementation for converting a types list to arrays of unique types. More...
 
struct  types_to_arrays< types< Types... >, types< Unique... > >
 Specialization for converting a types list to arrays of unique types. More...
 
struct  types_to_containers
 Transforms a types list to a containers list. More...
 
struct  types_to_containers< types< Types... >, Container >
 Specialization for transforming a types list to a containers list. More...
 
struct  types_transform_impl
 Implementation for transforming a types list using a transform template. More...
 
struct  types_transform_impl< types< Types... >, Transform >
 Specialization for transforming a types list using a transform template. More...
 
struct  types_unique_impl
 Implementation for creating a unique types list from a types list. More...
 
struct  types_unique_impl< types< Types... > >
 Specialization for creating a unique types list from a types list. More...
 
struct  types_view
 
struct  types_view< N, types< Type, Other... > >
 
struct  types_view< N, types<> >
 
struct  unique_types_impl
 Implementation for creating a unique types list. More...
 
struct  unique_types_impl< T >
 Specialization for a single type. More...
 
struct  unique_types_impl< T, Other... >
 Specialization for multiple types. More...
 

Functions

template<typename T , typename... Other>
consteval bool contains_type ()
 Helper to check if a type is contained in a list of types.
 
template<typename T , std::size_t N, std::size_t I, typename Type , typename... Other>
constexpr std::size_t types_index_of_impl ()
 Helper to get the index of a type in a types list.
 

Function Documentation

◆ contains_type()

template<typename T , typename... Other>
bool koutil::type::detail::contains_type ( )
consteval

Helper to check if a type is contained in a list of types.

Template Parameters
TThe type to check.
OtherThe list of other types.
Returns
True if T is contained in Other, false otherwise.

◆ types_index_of_impl()

template<typename T , std::size_t N, std::size_t I, typename Type , typename... Other>
std::size_t koutil::type::detail::types_index_of_impl ( )
constexpr

Helper to get the index of a type in a types list.

Template Parameters
TThe type to find.
NThe number of occurrences to skip.
IThe current index.
TypeThe first type in the list.
OtherThe other types in the list.
Returns
The index of the N-th occurrence of T in the types list.