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

Namespaces

namespace  detail
 

Classes

struct  are_types
 
struct  are_types< types< Types... > >
 
struct  types
 A structure representing a variadic list of types. More...
 
struct  types_cat
 Concatenates two types lists. More...
 
struct  types_cat< types< T... >, types< U... > >
 Specialization for concatenating two types lists. More...
 
struct  types_containers
 A namespace containing container templates for types lists. More...
 
struct  types_count
 A template structure to count occurrences of a specific type in a types list. More...
 
struct  types_count< types< Types... > >
 Specialization to count occurrences of a specific type in a types list. More...
 
struct  types_transforms
 A namespace containing transform templates for types lists. More...
 

Concepts

concept  types_concept
 
concept  types_transform
 Concept for a type that provides a transform template.
 
concept  types_container
 Concept for a type that provides a container template.
 

Typedefs

template<types_concept T, types_concept U>
using types_cat_t = types_cat<T, U>::type
 Alias for the concatenated types list.
 
template<types_concept Types, std::size_t I>
using types_get_t = detail::types_get_impl<Types, I>::type
 Alias for getting a type by index in a types list.
 
template<typename... Types>
using unique_types_t = detail::unique_types_impl<Types...>::type
 Alias for creating a unique types list from a list of types.
 
template<types_concept Types>
using types_unique_t = detail::types_unique_impl<Types>::type
 Alias for creating a unique types list from a types list.
 
template<types_concept Types, types_transform Transform>
using types_transform_t = detail::types_transform_impl<Types, Transform>::type
 Alias for transforming a types list using a transform template.
 
template<types_concept Types, types_container Container = types_containers::vector>
using types_to_containers_t = detail::types_to_containers<Types, Container>::type
 Alias for transforming a types list to a containers list.
 
template<types_concept Types>
using types_to_arrays_t = detail::types_to_arrays<Types, types_unique_t<Types>>::type
 Alias for converting a types list to arrays of unique types.
 
template<types_concept Types, typename T >
using types_remove_t = detail::types_remove<Types, T>::type
 
template<types_concept Types, std::size_t N>
using types_view_t = detail::types_view<N, Types>::type
 

Functions

template<typename T , std::size_t... Sizes>
constexpr auto array_concat (const std::array< T, Sizes > &... arrays)
 Concatenates multiple arrays into one array.
 

Variables

template<typename T >
constexpr bool are_types_v = are_types<T>::value
 
template<types_concept Types, typename T , std::size_t Skip = 0>
constexpr std::size_t types_index_of_v = detail::types_index_of<T, Types, Skip>::value
 Gets the index of a type in a types list.
 

Typedef Documentation

◆ types_cat_t

template<types_concept T, types_concept U>
using koutil::type::types_cat_t = types_cat<T, U>::type

Alias for the concatenated types list.

Template Parameters
TThe first types list.
UThe second types list.

◆ types_get_t

template<types_concept Types, std::size_t I>
using koutil::type::types_get_t = detail::types_get_impl<Types, I>::type

Alias for getting a type by index in a types list.

Template Parameters
TypesThe types list.
IThe index.

◆ types_remove_t

template<types_concept Types, typename T >
using koutil::type::types_remove_t = detail::types_remove<Types, T>::type

◆ types_to_arrays_t

template<types_concept Types>
using koutil::type::types_to_arrays_t = detail::types_to_arrays<Types, types_unique_t<Types>>::type

Alias for converting a types list to arrays of unique types.

Template Parameters
TypesThe types list.

◆ types_to_containers_t

template<types_concept Types, types_container Container = types_containers::vector>
using koutil::type::types_to_containers_t = detail::types_to_containers<Types, Container>::type

Alias for transforming a types list to a containers list.

Template Parameters
TThe types list.
ContainerThe container template.

◆ types_transform_t

template<types_concept Types, types_transform Transform>
using koutil::type::types_transform_t = detail::types_transform_impl<Types, Transform>::type

Alias for transforming a types list using a transform template.

Template Parameters
TThe types list.
TransformThe transform template.

◆ types_unique_t

template<types_concept Types>
using koutil::type::types_unique_t = detail::types_unique_impl<Types>::type

Alias for creating a unique types list from a types list.

Template Parameters
TypesThe types list.

◆ types_view_t

template<types_concept Types, std::size_t N>
using koutil::type::types_view_t = detail::types_view<N, Types>::type

◆ unique_types_t

template<typename... Types>
using koutil::type::unique_types_t = detail::unique_types_impl<Types...>::type

Alias for creating a unique types list from a list of types.

Template Parameters
TypesThe types in the list.

Function Documentation

◆ array_concat()

template<typename T , std::size_t... Sizes>
auto koutil::type::array_concat ( const std::array< T, Sizes > &... arrays)
constexpr

Concatenates multiple arrays into one array.

Template Parameters
TThe type of the array elements.
SizesThe sizes of the arrays.
Parameters
arraysThe arrays to concatenate.
Returns
The concatenated array.

Variable Documentation

◆ are_types_v

template<typename T >
bool koutil::type::are_types_v = are_types<T>::value
inlineconstexpr

◆ types_index_of_v

template<types_concept Types, typename T , std::size_t Skip = 0>
std::size_t koutil::type::types_index_of_v = detail::types_index_of<T, Types, Skip>::value
inlineconstexpr

Gets the index of a type in a types list.

Template Parameters
TypesThe types list.
TThe type to find.
SkipThe number of occurrences to skip.