19 template <
typename Initial,
typename... Ts>
32 template <
template <
typename...>
class Initial,
template <
typename...>
class Appender,
typename... Inits,
typename... Apps>
44 template <
template <
typename...>
class Initial,
typename Elem,
typename... Inits>
55 template <
typename Initial,
typename... Preps>
68 template <
template <
typename...>
class Initial,
template <
typename...>
class Prepender,
typename... Inits,
typename... Preps>
80 template <
template <
typename...>
class Initial,
typename Elem,
typename... Inits>
90 template <
typename... T>
100 template <
typename T,
typename U,
typename... Ts>
113 template <
template <
typename...>
class Tlist,
typename T,
typename U,
typename... Ts>
124 template <
typename... T>
133 template <
typename T,
typename... Ts>
147 template <
template <
typename...>
class Tlist,
typename U,
typename... Ts>
159 template <
typename... Ts>
168 template <
typename Head,
typename Tail>
182 template <
typename Head,
typename Mid,
typename... Tail>
192 constexpr static size_t size = type::size;
203 template <
template <
typename...>
class Tlist,
typename... Ts>
213 constexpr static size_t size = type::size;
227 template <
typename... Fns>
230 using Fns::operator()...;
241 template <std::
size_t x>
242 using value = std::integral_constant<std::size_t, x>;
250 template <std::size_t idx,
typename... Ts>
253 static_assert(idx <=
sizeof...(Ts) && idx >= 0,
"Index out of bounds");
256 using type =
decltype([]<std::size_t... i>(std::index_sequence<i...>)
260 return std::type_identity<Ts>();
270 template <std::size_t idx,
template <
typename...>
class T,
typename... Ts>
282 template <std::size_t idx,
typename... Ts>
291 template <
typename T,
typename... Ts>
295 constexpr static bool value = (std::is_same_v<T, Ts> || ...);
305 template <
typename T,
template <
typename...>
class U,
typename... Ts>
320 template <
typename T,
typename... List>
328 (... && (!std::is_same_v<T, List> && ++i));
343 template <
typename T,
template <
typename...>
class U,
typename... List>
357 template <
typename T,
typename... List>
358 constexpr static auto index_at_type_v =
index_at_type<T, List...>::index;
374 template <
typename... Ts>
388 template <
typename T>
399 template <
typename... Ts>
410 template <
typename T,
typename... Rest>
434 template <
typename... Ts>
442 template <
typename T,
typename... Ts>
449 using type = std::conditional_t<
455 template <
typename... Ts>
467 template <std::
size_t Offset,
typename Seq>
476 template <std::size_t Offset, std::size_t... Is>
480 using type = std::index_sequence<(Is + Offset)...>;
493 template <
typename T,
typename F,
typename S>
504 template <
template <
typename...>
class T,
typename... Args, std::size_t... Is, std::size_t... Js>
505 struct type_list_split<T<Args...>, std::index_sequence<Is...>, std::index_sequence<Js...>>
508 using first = T<std::tuple_element_t<Is, std::tuple<Args...>>...>;
511 using second = T<std::tuple_element_t<Js, std::tuple<Args...>>...>;
523 template <
typename Ts>
532 template <
template <
typename...>
class T,
typename... Args>
537 static constexpr std::size_t mid =
sizeof...(Args) / 2;
540 using first_indices = std::make_index_sequence<mid>;
545 std::make_index_sequence<
sizeof...(Args) - mid>>
::type;
548 using full_type =
type_list_split<T<Args...>, first_indices, second_indices>;
552 using first =
typename full_type::first;
555 using second =
typename full_type::second;
static constexpr auto index
Index of type T in List.
Definition type_list.hpp:347
Get the index of a type in a type list.
Definition type_list.hpp:322
static constexpr auto index
Index of type T in List.
Definition type_list.hpp:324
A compile-time list of types.
Definition pack.hpp:46
hidden::pack< Ts... > type
Definition pack.hpp:48
Helper visitor struct inheriting from multiple function objects.
Definition type_list.hpp:229
std::index_sequence<(Is+Offset)... > type
Resulting index sequence with offset applied.
Definition type_list.hpp:480
Utility to create an offset std::index_sequence.
Definition type_list.hpp:468
Get the type at a given index in a parameter pack.
Definition type_list.hpp:252
decltype([]< std::size_t... i >(std::index_sequence< i... >) { return internal::visitor{[](value< i >) { return std::type_identity< Ts >(); }...}(value< idx >{});}(std::index_sequence_for< Ts... >()))::type type
Type at index idx.
Definition type_list.hpp:256
Appends types or type lists to an existing type list.
Definition type_list.hpp:21
Check if a type list contains a given type.
Definition type_list.hpp:293
static constexpr bool value
True if T is in Ts...
Definition type_list.hpp:295
Recursively flattens nested type_lists into a single flat type_list.
Definition type_list.hpp:375
type_list::type type
Type list without the last type.
Definition type_list.hpp:190
static constexpr size_t size
Number of types after popping.
Definition type_list.hpp:192
typename type_list_pop_back< Mid, Tail... >::popped popped
The popped (removed) last type.
Definition type_list.hpp:194
Tail popped
The popped (removed) last type.
Definition type_list.hpp:172
type_list::popped popped
The popped (removed) last type.
Definition type_list.hpp:215
static constexpr size_t size
Number of types after popping.
Definition type_list.hpp:213
type_list::type type
Type list without the last type.
Definition type_list.hpp:211
Remove the last type from a type list.
Definition type_list.hpp:160
T popped
The popped (removed) first type.
Definition type_list.hpp:137
U popped
The popped (removed) first type.
Definition type_list.hpp:151
Remove the first type from a type list.
Definition type_list.hpp:125
Prepends types or type lists to an existing type list.
Definition type_list.hpp:57
Reverse the order of types in a type list.
Definition type_list.hpp:91
T< std::tuple_element_t< Js, std::tuple< Args... > >... > second
Second half of the split type list.
Definition type_list.hpp:511
T< std::tuple_element_t< Is, std::tuple< Args... > >... > first
First half of the split type list.
Definition type_list.hpp:508
typename full_type::second second
Second half of the split type list.
Definition type_list.hpp:555
typename full_type::first first
First half of the split type list.
Definition type_list.hpp:552
Splits a type list into two halves.
Definition type_list.hpp:524
Splits a type list into two sublists using index sequences.
Definition type_list.hpp:494
Removes duplicate types from a parameter pack.
Definition type_list.hpp:435
std::integral_constant< std::size_t, x > value
Integral constant wrapper for a size_t value.
Definition type_list.hpp:242
type_at_index< idx, Ts... >::type type_at_index_t
Convenience alias for type_at_index::type.
Definition type_list.hpp:283