36#error THIS HEADER IS A GENERATOR. DO NOT INCLUDE.
65#ifndef ETL_SMALLEST_INCLUDED
66#define ETL_SMALLEST_INCLUDED
78#if ETL_USING_CPP11 && !defined(ETL_SMALLEST_TYPE_FORCE_CPP03_IMPLEMENTATION)
85 template <
typename T1,
typename... TRest>
91 using smallest_other =
typename smallest_type<TRest...>::type;
112 template <
typename T1>
113 class smallest_type<T1>
126 template <
typename... T>
127 using smallest_type_t =
typename smallest_type<T...>::type;
131 template <
typename... T>
132 constexpr size_t smallest_type_v = smallest_type<T...>::size;
224 namespace private_smallest
238 typedef uint_least8_t type;
247 typedef uint_least16_t type;
256 typedef uint_least32_t type;
259#if ETL_USING_64BIT_TYPES
266 typedef uint_least64_t type;
282 typedef int_least8_t type;
291 typedef int_least16_t type;
300 typedef int_least32_t type;
303#if ETL_USING_64BIT_TYPES
310 typedef int_least64_t type;
321 template <
size_t NBITS>
327 static ETL_CONSTANT
int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
328 ((NBITS > 16) ? 1 : 0) +
329 ((NBITS > 32) ? 1 : 0);
336 template <
size_t NBITS>
340 template <
size_t NBITS>
341 using smallest_uint_for_bits_t =
typename smallest_uint_for_bits<NBITS>::type;
350 template <
size_t NBITS>
356 static ETL_CONSTANT
int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
357 ((NBITS > 16) ? 1 : 0) +
358 ((NBITS > 32) ? 1 : 0);
365 template <
size_t NBITS>
369 template <
size_t NBITS>
370 using smallest_int_for_bits_t =
typename smallest_int_for_bits<NBITS>::type;
379 template <u
intmax_t VALUE>
385 static ETL_CONSTANT
int TYPE_INDEX = ((VALUE > UINT_LEAST8_MAX) ? 1 : 0) +
386 ((VALUE > UINT16_MAX) ? 1 : 0) +
387 ((VALUE > UINT32_MAX) ? 1 : 0);
394 template <u
intmax_t VALUE>
398 template <u
intmax_t VALUE>
399 using smallest_uint_for_value_t =
typename smallest_uint_for_value<VALUE>::type;
408 template <
intmax_t VALUE>
414 static ETL_CONSTANT
int TYPE_INDEX = (((VALUE > intmax_t(INT_LEAST8_MAX)) || (VALUE < intmax_t(INT_LEAST8_MIN))) ? 1 : 0) +
415 (((VALUE > intmax_t(INT16_MAX)) || (VALUE < intmax_t(INT16_MIN))) ? 1 : 0) +
416 (((VALUE > intmax_t(INT32_MAX)) || (VALUE < intmax_t(INT32_MIN))) ? 1 : 0);
423 template <
intmax_t VALUE>
427 template <
intmax_t VALUE>
428 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:352
Template to determine the smallest int type that can contain the specified signed value....
Definition: smallest_generator.h:410
Template to determine the smallest unsigned int type that can contain a value with the specified numb...
Definition: smallest_generator.h:323
Template to determine the smallest unsigned int type that can contain the specified unsigned value....
Definition: smallest_generator.h:381
conditional
Definition: type_traits_generator.h:1160
bitset_ext
Definition: absolute.h:38
Definition: smallest_generator.h:274
Definition: smallest_generator.h:230
size_of
Definition: type_traits_generator.h:1551