36 #error THIS HEADER IS A GENERATOR. DO NOT INCLUDE.
65 #ifndef ETL_SMALLEST_INCLUDED
66 #define ETL_SMALLEST_INCLUDED
78 #if ETL_CPP11_SUPPORTED && !defined(ETL_SMALLEST_TYPE_FORCE_CPP03)
85 template <
typename T1,
typename... TRest>
91 using smallest_other =
typename smallest_type<TRest...>::type;
112 template <
typename T1>
113 class smallest_type<T1>
125 #if ETL_CPP14_SUPPORTED
126 template <
typename... T>
127 using smallest_type_t =
typename smallest_type<T...>::type;
130 #if ETL_CPP17_SUPPORTED
131 template <
typename... T>
132 constexpr
size_t smallest_type_v = smallest_type<T...>::size;
224 namespace private_smallest
229 template <const
int index>
238 typedef uint_least8_t type;
247 typedef uint_least16_t type;
256 typedef uint_least32_t type;
265 typedef uint_least64_t type;
271 template <const
int index>
280 typedef int_least8_t type;
289 typedef int_least16_t type;
298 typedef int_least32_t type;
307 typedef int_least64_t type;
317 template <
size_t NBITS>
323 static const int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
324 ((NBITS > 16) ? 1 : 0) +
325 ((NBITS > 32) ? 1 : 0);
332 #if ETL_CPP14_SUPPORTED
333 template <
size_t NBITS>
334 using smallest_uint_for_bits_t =
typename smallest_uint_for_bits<NBITS>::type;
343 template <
size_t NBITS>
349 static const int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
350 ((NBITS > 16) ? 1 : 0) +
351 ((NBITS > 32) ? 1 : 0);
358 #if ETL_CPP14_SUPPORTED
359 template <
size_t NBITS>
360 using smallest_int_for_bits_t =
typename smallest_int_for_bits<NBITS>::type;
369 template <u
intmax_t VALUE>
375 static const int TYPE_INDEX = ((VALUE > UINT_LEAST8_MAX) ? 1 : 0) +
376 ((VALUE > UINT16_MAX) ? 1 : 0) +
377 ((VALUE > UINT32_MAX) ? 1 : 0);
384 #if ETL_CPP14_SUPPORTED
385 template <u
intmax_t VALUE>
386 using smallest_uint_for_value_t =
typename smallest_uint_for_value<VALUE>::type;
395 template <const
intmax_t VALUE>
401 static const int TYPE_INDEX = (((VALUE > intmax_t(INT_LEAST8_MAX)) || (VALUE < intmax_t(INT_LEAST8_MIN))) ? 1 : 0) +
402 (((VALUE > intmax_t(INT16_MAX)) || (VALUE < intmax_t(INT16_MIN))) ? 1 : 0) +
403 (((VALUE > intmax_t(INT32_MAX)) || (VALUE < intmax_t(INT32_MIN))) ? 1 : 0);
410 #if ETL_CPP14_SUPPORTED
411 template <
intmax_t VALUE>
412 using smallest_int_for_value_t =
typename smallest_int_for_value<VALUE>::type;
Template to determine the smallest signed int type that can contain a value with the specified number...
Definition: smallest_generator.h:345
Template to determine the smallest int type that can contain the specified signed value....
Definition: smallest_generator.h:397
Template to determine the smallest unsigned int type that can contain a value with the specified numb...
Definition: smallest_generator.h:319
Template to determine the smallest unsigned int type that can contain the specified unsigned value....
Definition: smallest_generator.h:371
conditional
Definition: type_traits_generator.h:1202
Definition: absolute.h:37
Definition: smallest_generator.h:272
Definition: smallest_generator.h:230
size_of
Definition: type_traits_generator.h:1572