29#ifndef ETL_TYPE_LOOKUP_INCLUDED
30#define ETL_TYPE_LOOKUP_INCLUDED
34#include "static_assert.h"
41#error THIS HEADER IS A GENERATOR. DO NOT INCLUDE.
53 template <
typename T,
int ID_>
67 template <
typename T1,
typename T2>
74#if ETL_USING_CPP11 && !defined(ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION)
78 template <
typename... TTypes>
87 template <
size_t ID,
typename T1,
typename... TRest>
88 struct type_from_id_helper
92 typename type_from_id_helper<ID, TRest...>::type>::type;
96 template <
size_t ID,
typename T1>
97 struct type_from_id_helper<ID, T1>
112 using type =
typename type_from_id_helper<ID, TTypes...>::type;
118 using type_from_id_t =
typename type_from_id<ID>::type;
125 template <
typename T,
typename T1,
typename... TRest>
126 struct id_from_type_helper
132 template <
typename T,
typename T1>
133 struct id_from_type_helper<T, T1>
143 template <
typename T>
146 static constexpr size_t value = id_from_type_helper<T, TTypes...>::value;
148 static_assert(value != UNKNOWN,
"Invalid type");
152 template <
typename T>
153 static constexpr size_t id_from_type_v = id_from_type<T>::value;
157 template <
typename T>
158 static unsigned int get_id_from_type(
const T&)
160 return get_id_from_type<T>();
164 template <
typename T>
165 static unsigned int get_id_from_type()
167 return id_from_type<T>::value;
174 template <
typename... TTypes>
175 class type_type_lookup
182 template <
typename T,
typename T1,
typename... TRest>
183 struct type_from_type_helper
187 typename type_from_type_helper<T, TRest...>::type>::type;
190 template <
typename T,
typename T1>
191 struct type_from_type_helper<T, T1>
200 template <
typename T>
206 using type =
typename type_from_type_helper<T, TTypes...>::type;
212 template <
typename T>
213 using type_from_type_t =
typename type_from_type<T>::type;
221 template <
typename T1,
263 ::type>::type>::type>::type>
264 ::type>::type>::type>::type>
265 ::type>::type>::type>::type
type;
276 template <
typename T>
298 (
unsigned int) UNKNOWN
301 ETL_STATIC_ASSERT(((
unsigned int)value != (
unsigned int)UNKNOWN),
"Invalid type");
305 template <
typename T>
306 static unsigned int get_id_from_type(
const T&)
312 template <
typename T>
313 static unsigned int get_id_from_type()
315 return id_from_type<T>::value;
322 template <
typename T1,
343 template <
typename T>
364 ::type>::type>::type>::type>::type>::type>::type>::type
type;
Definition integral_limits.h:516
conditional
Definition type_traits_generator.h:1155
is_same
Definition type_traits_generator.h:1036
bitset_ext
Definition absolute.h:38
pair holds two objects of arbitrary type
Definition utility.h:164
Definition type_lookup.h:278
Definition type_lookup.h:244
Definition type_lookup.h:238
Definition type_lookup.h:345
Definition type_lookup.h:339