Templa 0.0.1-alpha
C++ Metaprogramming Utilities
Loading...
Searching...
No Matches
type_list.hpp File Reference

Provides utilities for compile time type list manipulation and operations. More...

#include <iostream>

Go to the source code of this file.

Classes

struct  templa::type_list_append< Initial, Ts >
 Appends types or type lists to an existing type list. More...
struct  templa::type_list_append< Initial< Inits... >, Appender< Apps... > >
 Specialization to append one type list to another. More...
struct  templa::type_list_append< Initial< Inits... >, Elem >
 Append a single type to a type list. More...
struct  templa::type_list_prepend< Initial, Preps >
 Prepends types or type lists to an existing type list. More...
struct  templa::type_list_prepend< Initial< Inits... >, Prepender< Preps... > >
 Specialization to prepend one type list to another. More...
struct  templa::type_list_prepend< Initial< Inits... >, Elem >
 Prepend a single type to a type list. More...
struct  templa::type_list_reverse< T, U, Ts... >
 Reverse a pack of types. More...
struct  templa::type_list_reverse< Tlist< T, U, Ts... > >
 Reverse types in a templated type list. More...
struct  templa::type_list_pop_front< T, Ts... >
 Remove the first type from a pack of types. More...
struct  templa::type_list_pop_front< Tlist< U, Ts... > >
 Remove the first type from a templated type list. More...
struct  templa::type_list_pop_back< Head, Tail >
 Specialization for exactly two types: last type is popped. More...
struct  templa::type_list_pop_back< Head, Mid, Tail... >
 Remove the last type from a longer pack recursively. More...
struct  templa::type_list_pop_back< Tlist< Ts... > >
 Remove the last type from a templated type list. More...
struct  templa::internal::visitor< Fns >
 Helper visitor struct inheriting from multiple function objects. More...
struct  templa::type_at_index< idx, Ts >
 Get the type at a given index in a parameter pack. More...
struct  templa::type_at_index< idx, T< Ts... > >
 Get the type at a given index in a templated type list. More...
struct  templa::type_list_contains< T, Ts >
 Check if a type list contains a given type. More...
struct  templa::type_list_contains< T, U< Ts... > >
 Check if a templated type list contains a given type. More...
struct  templa::index_at_type< T, List >
 Get the index of a type in a type list. More...
struct  templa::index_at_type< T, U< List... > >
 Get the index of a type in a templated type list. More...
struct  templa::type_list_flatten<>
 Base case: flattening an empty list yields an empty type_list. More...
struct  templa::type_list_flatten< T >
 If the input is a non-type_list type, return it as a single-element type_list. More...
struct  templa::type_list_flatten< internal::type_list< Ts... > >
 If the input is a type_list, recurse into its elements. More...
struct  templa::type_list_flatten< T, Rest... >
 Recursive case: flatten head and tail separately and append results. More...
struct  templa::type_list_unique<>
struct  templa::type_list_unique< T, Ts... >
struct  templa::offset_index_sequence< Offset, std::index_sequence< Is... > >
 Specialization for generating an offset index sequence. More...
struct  templa::type_list_split< T< Args... >, std::index_sequence< Is... >, std::index_sequence< Js... > >
 Specialization of type_list_split for variadic type lists. More...
struct  templa::type_list_split_half< T< Args... > >
 Specialization to split T<Args...> into two halves. More...

Typedefs

template<std::size_t x>
using templa::value = std::integral_constant<std::size_t, x>
 Integral constant wrapper for a size_t value.
template<std::size_t idx, typename... Ts>
using templa::type_at_index_t = type_at_index<idx, Ts...>::type
 Convenience alias for type_at_index::type.
template<typename... Ts>
using templa::type_list_unique_t = typename type_list_unique<Ts...>::type

Detailed Description

Provides utilities for compile time type list manipulation and operations.

Typedef Documentation

◆ type_at_index_t

template<std::size_t idx, typename... Ts>
using templa::type_at_index_t = type_at_index<idx, Ts...>::type

Convenience alias for type_at_index::type.

Template Parameters
idxIndex to access.
TsParameter pack of types.

◆ value

template<std::size_t x>
using templa::value = std::integral_constant<std::size_t, x>

Integral constant wrapper for a size_t value.

Used as a tag for compile-time indexing.

Template Parameters
xThe value.