29#ifndef ETL_TYPE_LOOKUP_INCLUDED
30#define ETL_TYPE_LOOKUP_INCLUDED
34#include "static_assert.h"
45#error THIS HEADER IS A GENERATOR. DO NOT INCLUDE.
65 template <
typename T,
int ID_>
79 template <
typename T1,
typename T2>
86#if ETL_USING_CPP11 && !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
90 template <
typename... TTypes>
99 template <
size_t ID,
typename T1,
typename... TRest>
100 struct type_from_id_helper
104 typename type_from_id_helper<ID, TRest...>::type>::type;
108 template <
size_t ID,
typename T1>
109 struct type_from_id_helper<ID, T1>
124 using type =
typename type_from_id_helper<ID, TTypes...>::type;
130 using type_from_id_t =
typename type_from_id<ID>::type;
137 template <
typename T,
typename T1,
typename... TRest>
138 struct id_from_type_helper
144 template <
typename T,
typename T1>
145 struct id_from_type_helper<T, T1>
155 template <
typename T>
158 static constexpr size_t value = id_from_type_helper<T, TTypes...>::value;
160 static_assert(value != UNKNOWN,
"Invalid type");
164 template <
typename T>
165 static constexpr size_t id_from_type_v = id_from_type<T>::value;
169 template <
typename T>
170 static unsigned int get_id_from_type(
const T&)
172 return get_id_from_type<T>();
176 template <
typename T>
177 static unsigned int get_id_from_type()
179 return id_from_type<T>::value;
186 template <
typename... TTypes>
187 class type_type_lookup
194 template <
typename T,
typename T1,
typename... TRest>
195 struct type_from_type_helper
199 typename type_from_type_helper<T, TRest...>::type>::type;
202 template <
typename T,
typename T1>
203 struct type_from_type_helper<T, T1>
212 template <
typename T>
218 using type =
typename type_from_type_helper<T, TTypes...>::type;
224 template <
typename T>
225 using type_from_type_t =
typename type_from_type<T>::type;
Definition: integral_limits.h:468
conditional
Definition: type_traits_generator.h:1160
is_same
Definition: type_traits_generator.h:1041
bitset_ext
Definition: absolute.h:38
Definition: type_lookup.h:238
The type/id pair type to use for type/id lookup template parameters.
Definition: type_lookup_generator.h:67
The type/type pair type to use for type/type lookup template parameters.
Definition: type_lookup_generator.h:81