5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_LIST_AT_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_LIST_AT_HPP_
12#include "arene/base/stdlib_choice/cstddef.hpp"
13#include "arene/base/stdlib_choice/integer_sequence.hpp"
14#include "arene/base/stdlib_choice/tuple_element.hpp"
31using tl = arene::base::type_list<Tn...>;
36template <
typename... Bases>
37class idx :
public Bases... {};
42template <std::
size_t Index,
typename T>
52template <std::
size_t Index,
typename T>
53inline auto get_element_type(idx_el<Index, T>
const&) -> arene::base::type_identity<T>;
76template <std::
size_t Index,
typename L0>
83template <
std::size_t Index,
template <
typename...>
class TypeList0,
typename... Tn0>
84class at_impl<Index, TypeList0<Tn0...>> {
86 static_assert(Index <
sizeof...(Tn0),
"Index must be less than the number of types in the list");
88 using type =
typename decltype(::arene::base::type_lists::at_detail::get_element_type<Index>(
103template <
class L0, std::
size_t Index>
104using at = arene::base::type_lists::at_detail::at_impl<Index, L0>;
112template <
class L0, std::
size_t Index>
127 :
public arene::base::type_lists::at_detail::at_impl<I, arene::base::type_list<Tn...>> {};
obtains the type of the specified element
Definition tuple_element.hpp:28
Definition apply_all.hpp:14
arene::base::type_lists::at_detail::at_impl< Index, L0 > at
Get the n-th element from a type list.
Definition at.hpp:104
typename at< L0, Index >::type at_t
Get the n-th element from a type list.
Definition at.hpp:113
Definition accumulate.hpp:37
Definition accumulate.hpp:36
make_integer_sequence< size_t, Size > make_index_sequence
A helper alias template for make_integer_sequence<size_t, Size>
Definition integer_sequence.hpp:224
integer_sequence< size_t, Ints... > index_sequence
A helper alias template for integer_sequence<size_t, Ints>
Definition integer_sequence.hpp:218
::size_t size_t
A type suitable for holding the size of an object.
Definition cstddef.hpp:29