Struct type_list_element< Index, type_list< Type, Other... > >

Synopsis

#include <src/entt/core/type_traits.hpp>

template<std::size_t Index, typename Type, typename... Other>
struct type_list_element<Index, type_list<Type, Other...>>
    : type_list_element<Index - 1u, type_list<Other...>>

Description

Provides compile-time indexed access to the types of a type list.

Template Parameters

Index - Index of the type to return.

Type - First type provided by the type list.

Other - Other types provided by the type list.

Inheritance

Ancestors: type_list_element

Source

Lines 147-150 in src/entt/core/type_traits.hpp.

template<std::size_t Index, typename Type, typename... Other>
struct type_list_element<Index, type_list<Type, Other...>>
    : type_list_element<Index - 1u, type_list<Other...>>
{};





Add Discussion

Log in to comment