koutil
Loading...
Searching...
No Matches
types.h File Reference
#include <array>
#include <cassert>
#include <cstddef>
#include <tuple>
#include <type_traits>
#include <utility>
#include <variant>
#include <vector>

Go to the source code of this file.

Classes

struct  koutil::type::types< T >
 A structure representing a variadic list of types. More...
 
struct  koutil::type::are_types< T >
 
struct  koutil::type::are_types< types< Types... > >
 
struct  koutil::type::types_cat< types< T... >, types< U... > >
 Specialization for concatenating two types lists. More...
 
struct  koutil::type::types_transforms
 A namespace containing transform templates for types lists. More...
 
struct  koutil::type::types_transforms::tuple
 Provides a std::tuple transform. More...
 
struct  koutil::type::types_transforms::variant
 Provides a std::variant transform. More...
 
struct  koutil::type::types_transforms::reference
 Provides a T& transform. More...
 
struct  koutil::type::types_transforms::constant
 Provides a const T transform. More...
 
struct  koutil::type::types_transforms::constant_reference
 
struct  koutil::type::types_transforms::vector_reference
 Provides a std::vector<T>::reference transform. More...
 
struct  koutil::type::types_transforms::vector_const_reference
 
struct  koutil::type::types_containers
 A namespace containing container templates for types lists. More...
 
struct  koutil::type::types_containers::vector
 Provides a std::vector container. More...
 
struct  koutil::type::types_count< types< Types... > >
 Specialization to count occurrences of a specific type in a types list. More...
 
struct  koutil::type::detail::unique_types_impl< T >
 Specialization for a single type. More...
 
struct  koutil::type::detail::unique_types_impl< T, Other... >
 Specialization for multiple types. More...
 
struct  koutil::type::detail::types_to_containers< types< Types... >, Container >
 Specialization for transforming a types list to a containers list. More...
 
struct  koutil::type::detail::types_transform_impl< types< Types... >, Transform >
 Specialization for transforming a types list using a transform template. More...
 
struct  koutil::type::detail::types_index_of< T, types< Types... >, N >
 Specialization to get the index of a type in a types list. More...
 
struct  koutil::type::detail::types_get_impl< types< Types... >, I >
 Specialization for getting a type by index in a types list. More...
 
struct  koutil::type::detail::types_get_impl< types<>, I >
 
struct  koutil::type::detail::types_unique_impl< types< Types... > >
 Specialization for creating a unique types list from a types list. More...
 
struct  koutil::type::detail::types_to_arrays< types< Types... >, types< Unique... > >
 Specialization for converting a types list to arrays of unique types. More...
 
struct  koutil::type::detail::types_remove_impl< Search, Type, Other >
 
struct  koutil::type::detail::types_remove_impl< Search, Type >
 
struct  koutil::type::detail::types_remove< types< Types... >, Type >
 
struct  koutil::type::detail::types_remove< types<>, Type >
 
struct  koutil::type::detail::types_view< N, types< Type, Other... > >
 
struct  koutil::type::detail::types_view< N, types<> >
 

Namespaces

namespace  koutil
 
namespace  koutil::type
 
namespace  koutil::type::detail
 

Concepts

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

Typedefs

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<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<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<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<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<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<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<types_concept Types, typename T >
using koutil::type::types_remove_t = detail::types_remove<Types, T>::type
 
template<types_concept Types, std::size_t N>
using koutil::type::types_view_t = detail::types_view<N, Types>::type
 

Functions

template<typename T , typename... Other>
consteval bool koutil::type::detail::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 koutil::type::detail::types_index_of_impl ()
 Helper to get the index of a type in a types list.
 

Variables

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