1#ifndef _STDEX_CSTDINT_H
2#define _STDEX_CSTDINT_H
23#if ( !defined(CHAR_BIT) || CHAR_BIT < 1 )
24 #error "Number of bits in char (macro CHAR_BIT) is not defined!"
33#define _STDEX_TWO_COMPLEMENT_REPRESENTATION_IS_USED ( (SCHAR_MAX + SCHAR_MIN) == -1 )
36#define _STDEX_MIN_RANGE_INT16_LOWER_BOUND (-32767)
37#define _STDEX_MIN_RANGE_INT16_UPPER_BOUND 32767
38#define _STDEX_MIN_RANGE_INT32_LOWER_BOUND (-2147483647)
39#define _STDEX_MIN_RANGE_INT32_UPPER_BOUND 2147483647
40#if defined(LLONG_MIN) && defined(LLONG_MAX)
41 #define _STDEX_MIN_RANGE_INT64_LOWER_BOUND (-9223372036854775807ll)
42 #define _STDEX_MIN_RANGE_INT64_UPPER_BOUND 9223372036854775807ll
46#define _STDEX_SHRT_IS_IN_INT16_MAX_RANGE ( ((SHRT_MIN - _STDEX_MIN_RANGE_INT16_LOWER_BOUND) >= -1) && ((SHRT_MAX - _STDEX_MIN_RANGE_INT16_UPPER_BOUND) <= 1) )
47#define _STDEX_INT_IS_IN_INT16_MAX_RANGE ( ((INT_MIN - _STDEX_MIN_RANGE_INT16_LOWER_BOUND) >= -1) && ((INT_MAX - _STDEX_MIN_RANGE_INT16_UPPER_BOUND) <= 1) )
49#define _STDEX_SHRT_IS_IN_INT32_MAX_RANGE ( ((SHRT_MIN - _STDEX_MIN_RANGE_INT32_LOWER_BOUND) >= -1) && ((SHRT_MAX - _STDEX_MIN_RANGE_INT32_UPPER_BOUND) <= 1) )
50#define _STDEX_INT_IS_IN_INT32_MAX_RANGE ( ((INT_MIN - _STDEX_MIN_RANGE_INT32_LOWER_BOUND) >= -1) && ((INT_MAX - _STDEX_MIN_RANGE_INT32_UPPER_BOUND) <= 1) )
51#define _STDEX_LONG_IS_IN_INT32_MAX_RANGE ( ((LONG_MIN - _STDEX_MIN_RANGE_INT32_LOWER_BOUND) >= -1) && ((LONG_MAX - _STDEX_MIN_RANGE_INT32_UPPER_BOUND) <= 1) )
53#if defined(LLONG_MIN) && defined(LLONG_MAX)
54 #define _STDEX_SHRT_IS_IN_INT64_MAX_RANGE ( ((SHRT_MIN - _STDEX_MIN_RANGE_INT64_LOWER_BOUND) >= -1ll) && ((SHRT_MAX - _STDEX_MIN_RANGE_INT64_UPPER_BOUND) <= 1ll) )
55 #define _STDEX_INT_IS_IN_INT64_MAX_RANGE ( ((INT_MIN - _STDEX_MIN_RANGE_INT64_LOWER_BOUND) >= -1ll) && ((INT_MAX - _STDEX_MIN_RANGE_INT64_UPPER_BOUND) <= 1ll) )
56 #define _STDEX_LONG_IS_IN_INT64_MAX_RANGE ( ((LONG_MIN - _STDEX_MIN_RANGE_INT64_LOWER_BOUND) >= -1ll) && ((LONG_MAX - _STDEX_MIN_RANGE_INT64_UPPER_BOUND) <= 1ll) )
57 #define _STDEX_LLONG_IS_IN_INT64_MAX_RANGE ( ((LLONG_MIN - _STDEX_MIN_RANGE_INT64_LOWER_BOUND) >= -1ll) && ((LLONG_MAX - _STDEX_MIN_RANGE_INT64_UPPER_BOUND) <= 1ll) )
60#define _STDEX_PLATFORM_CAN_HAVE_STD_8_BIT_MULTIPLE_INT ((CHAR_BIT <= 8) && ( ((CHAR_BIT % 2) == 0) || CHAR_BIT == 1))
63#define _STDEX_PLATFORM_CAN_HAVE_STD_8_BIT_INT \
64 ( _STDEX_PLATFORM_CAN_HAVE_STD_8_BIT_MULTIPLE_INT && (CHAR_BIT == 8) )
66#define _STDEX_PLATFORM_CAN_HAVE_STD_16_BIT_INT \
67 ( _STDEX_PLATFORM_CAN_HAVE_STD_8_BIT_MULTIPLE_INT && ( _STDEX_INT_IS_IN_INT16_MAX_RANGE || _STDEX_SHRT_IS_IN_INT16_MAX_RANGE || (CHAR_BIT == 16) ) )
69#define _STDEX_PLATFORM_CAN_HAVE_STD_32_BIT_INT \
70 ( _STDEX_PLATFORM_CAN_HAVE_STD_8_BIT_MULTIPLE_INT && ( _STDEX_LONG_IS_IN_INT32_MAX_RANGE || _STDEX_INT_IS_IN_INT32_MAX_RANGE || _STDEX_SHRT_IS_IN_INT32_MAX_RANGE || (CHAR_BIT == 32) ) )
72#define _STDEX_PLATFORM_CAN_HAVE_STD_64_BIT_INT \
73 ( _STDEX_PLATFORM_CAN_HAVE_STD_8_BIT_MULTIPLE_INT && ( _STDEX_LLONG_IS_IN_INT64_MAX_RANGE || _STDEX_LONG_IS_IN_INT64_MAX_RANGE || _STDEX_INT_IS_IN_INT64_MAX_RANGE || _STDEX_SHRT_IS_IN_INT64_MAX_RANGE || (CHAR_BIT == 64) ) )
80 namespace cstdint_detail
82 struct _constructible_from_any
85 _constructible_from_any(_Tp);
88 typedef char _yes_type;
94 namespace _is_integral_constant_std_impl_ns
96 class _is_integral_constant_std_impl_helper_type;
98 cstdint_detail::_yes_type check(_is_integral_constant_std_impl_helper_type*);
99 cstdint_detail::_no_type check(_constructible_from_any);
102 struct _is_integral_constant_std_impl
104 static const bool value =
105 sizeof(check(_Tp(NULL))) ==
sizeof(cstdint_detail::_yes_type) &&
106 sizeof(check(_Tp(1))) ==
sizeof(cstdint_detail::_no_type);
110 using _is_integral_constant_std_impl_ns::_is_integral_constant_std_impl;
112 namespace _is_integral_constant_hack_impl_ns
114 cstdint_detail::_yes_type check1(
int);
115 cstdint_detail::_no_type check1(_constructible_from_any);
118 cstdint_detail::_yes_type check2(_Tp);
120 cstdint_detail::_no_type check2(_constructible_from_any);
122 cstdint_detail::_yes_type check3(_constructible_from_any);
123 cstdint_detail::_no_type check3(
const float*);
124 cstdint_detail::_no_type check3(
const double*);
125 cstdint_detail::_no_type check3(
const long double*);
128 struct _is_integral_constant_hack_impl
130 static const bool value =
131 sizeof(check1(_Tp(NULL))) ==
sizeof(cstdint_detail::_yes_type) &&
132 sizeof(check2<_Tp>(NULL)) ==
sizeof(cstdint_detail::_yes_type) &&
133 sizeof(check3(
static_cast<_Tp*
>(NULL))) ==
sizeof(cstdint_detail::_yes_type);
137 using _is_integral_constant_hack_impl_ns::_is_integral_constant_hack_impl;
140 template<
class _Tp,
bool >
141 struct _is_integral_constant_impl :
142 _is_integral_constant_std_impl<_Tp>
146 struct _is_integral_constant_impl<_Tp, false> :
147 _is_integral_constant_hack_impl<_Tp>
151 struct _is_integral_constant:
152 _is_integral_constant_impl<_Tp,
153 _is_integral_constant_std_impl<unsigned short>::value == bool(true)
154 && _is_integral_constant_std_impl<long>::value == bool(true)
155 && _is_integral_constant_std_impl<signed char>::value == bool(true)
162 struct _is_integral_constant<_Tp&>
164 static const bool value =
false;
168 struct _is_integral_constant<_Tp*>
170 static const bool value =
false;
173 template<
class _Tp,
class _Cp>
174 struct _is_integral_constant<_Tp _Cp::*>
176 static const bool value =
false;
180 struct _is_integral_constant<void>
182 static const bool value =
false;
188 static const bool value = _Tp(-1) < _Tp(0);
194 static const bool value = _Tp(0) < _Tp(-1);
197 typedef void _cstdint_invalid_type;
199 template<
class _Tp,
bool>
200 struct _signed_definer
202 typedef _cstdint_invalid_type signed_type;
206 struct _signed_definer<_Tp, true>
208 typedef _Tp signed_type;
211 template<
class _Tp,
bool>
212 struct _unsigned_definer
214 typedef _cstdint_invalid_type unsigned_type;
218 struct _unsigned_definer<_Tp, true>
220 typedef _Tp unsigned_type;
224 struct _signed_unsigned:
225 _signed_definer<_Tp, cstdint_detail::_is_signed<_Tp>::value>,
226 _unsigned_definer<_Tp, cstdint_detail::_is_unsigned<_Tp>::value>
230 enum {_cstdint_invalid_size = 9999};
231 template<
int>
struct _sized_integer_map_impl {
static const int size = int(_cstdint_invalid_size);
typedef _cstdint_invalid_type signed_type;
typedef _cstdint_invalid_type unsigned_type;};
232 enum {_sized_integer_rank = __LINE__};
233 template<>
struct _sized_integer_map_impl<(__LINE__ - _sized_integer_rank)> {
static const int size =
sizeof(char) * CHAR_BIT * (_is_integral_constant<char>::value ? 1 : 0);
typedef signed char signed_type;
typedef unsigned char unsigned_type; };
234 template<>
struct _sized_integer_map_impl<(__LINE__ - _sized_integer_rank)> {
static const int size =
sizeof(
short int) * CHAR_BIT * (_is_integral_constant<short int>::value ? 1 : 0);
typedef short int signed_type;
typedef unsigned short int unsigned_type; };
235 template<>
struct _sized_integer_map_impl<(__LINE__ - _sized_integer_rank)> {
static const int size =
sizeof(int) * CHAR_BIT * (_is_integral_constant<int>::value ? 1 : 0);
typedef int signed_type;
typedef unsigned int unsigned_type; };
236 template<>
struct _sized_integer_map_impl<(__LINE__ - _sized_integer_rank)> {
static const int size =
sizeof(
long int) * CHAR_BIT * (_is_integral_constant<long int>::value ? 1 : 0);
typedef long int signed_type;
typedef unsigned long int unsigned_type; };
238 #if (_INTEGRAL_MAX_BITS == 64)
239 #define _STDEX_PLATFORM_CAN_HAVE_NON_STD_64_BIT_INT 1
240 template<>
struct _sized_integer_map_impl<(__LINE__ - _sized_integer_rank)> {
static const int size =
sizeof(__int64) * CHAR_BIT * (_is_integral_constant<__int64>::value ? 1 : 0);
typedef __int64 signed_type;
typedef unsigned __int64 unsigned_type; };
242 #if defined(LLONG_MIN) && defined(LLONG_MAX) && defined(ULLONG_MAX)
243 template<>
struct _sized_integer_map_impl<(__LINE__ - _sized_integer_rank)> {
static const int size =
sizeof(
long long int) * CHAR_BIT * (_is_integral_constant<long long int>::value ? 1 : 0);
typedef long long int signed_type;
typedef unsigned long long int unsigned_type; };
245 #if defined(WCHAR_MAX) && defined(WCHAR_MIN)
251 enum {_sized_integer_max_rank = __LINE__ - _sized_integer_rank};
253 template<
int _Rank,
bool _IsIntConst>
254 struct _sized_integer_map_helper:
255 _sized_integer_map_impl<_sized_integer_max_rank>
259 struct _sized_integer_map_helper<_Rank, true>:
260 _sized_integer_map_impl<_Rank>
264 struct _sized_integer_map:
265 _sized_integer_map_helper<_Rank, cstdint_detail::_is_integral_constant<typename _sized_integer_map_impl<_Rank>::signed_type>::value>
269 struct _sized_integer_map<_sized_integer_max_rank> :
270 _sized_integer_map_impl<_sized_integer_max_rank>
273 template<
int _BitsCount,
int _RankIt = 0,
int _Found = 0>
274 struct _exact_sized_integer_step;
276 template<
int _BitsCount,
int _RankIt,
int _Found>
277 struct _exact_sized_integer_step:
278 _exact_sized_integer_step<_BitsCount, _RankIt + 1, _sized_integer_map<_RankIt + 1>::size>{};
280 template<
int _BitsCount>
281 struct _exact_sized_integer_step<_BitsCount, _sized_integer_max_rank, _cstdint_invalid_size>:
282 _sized_integer_map<_sized_integer_max_rank>{};
284 template<
int _BitsCount,
int _RankIt>
285 struct _exact_sized_integer_step<_BitsCount, _RankIt, _BitsCount>:
286 _sized_integer_map<_RankIt>{};
288 template<
int _BitsCount,
int _RankIt,
int _FoundRank>
289 struct _least_sized_integer_step_expr
291 static const bool result = (
292 _sized_integer_map<_RankIt + 1>::size < _sized_integer_map<_FoundRank>::size &&
293 _sized_integer_map<_RankIt + 1>::size >= _BitsCount
295 static const int value = (result ? (_RankIt + 1) : _FoundRank);
298 template<
int _BitsCount,
int _RankIt = 0,
int _FoundRank = 0>
299 struct _least_sized_integer_step;
301 template<
int _BitsCount,
int _RankIt,
int _FoundRank>
302 struct _least_sized_integer_step:
303 _least_sized_integer_step<_BitsCount, _RankIt + 1,
304 _least_sized_integer_step_expr<_BitsCount, _RankIt, _FoundRank>::value>{};
306 template<
int _BitsCount,
int _FoundRank>
307 struct _least_sized_integer_step<_BitsCount, _sized_integer_max_rank, _FoundRank>:
308 _sized_integer_map<_FoundRank>{};
310 template<
int _RankIt,
int _FoundRank>
311 struct _max_sized_integer_step_expr
313 static const bool result =
315 ( _sized_integer_map<_RankIt + 1>::size > _sized_integer_map<_FoundRank>::size ) &&
316 ( _sized_integer_map<_RankIt + 1>::size < _sized_integer_map<_sized_integer_max_rank>::size )
318 static const int value = (result ? (_RankIt + 1) : _FoundRank);
321 template<
int _RankIt = 0,
int _FoundRank = 1>
322 struct _max_sized_integer_step:
323 _max_sized_integer_step<_RankIt + 1,
324 _max_sized_integer_step_expr<_RankIt, _FoundRank>::value>{};
327 template<
int _FoundRank>
328 struct _max_sized_integer_step<_sized_integer_max_rank, _FoundRank>:
329 _sized_integer_map<_FoundRank>{
static const int value = _FoundRank;};
334 struct _exact_sized_integer:
335 cstdint_detail::_exact_sized_integer_step<_Size>
338 template<
class _Signed,
int _Size>
339 struct _sized_integer_max_impl
341 static const _Signed max_value = ((_Signed(1) << (_Size - 2)) + ((_Signed(1) << (_Size - 2)) - _Signed(1)));
345 struct _sized_integer_max_impl<void, _Size>
348 template<
class _Signed,
int _Size>
349 struct _sized_integer_min_impl
351 #if _STDEX_TWO_COMPLEMENT_REPRESENTATION_IS_USED
352 static const _Signed min_value = (-(_sized_integer_max_impl<_Signed, _Size>::max_value) - 1);
354 static const _Signed min_value = (-(_sized_integer_max_impl<_Signed, _Size>::max_value));
359 struct _sized_integer_min_impl<void, _Size>
362 template<
class _Un
signed,
int _Size>
363 struct _sized_integer_umax_impl
365 char _sized_integer_umax_size_is_invalid_assert[_Size > 0 ? 1 : (
sizeof(_Unsigned) /
sizeof(_Unsigned) - 3)];
366 static const _Unsigned umax_value = _Size > 0 ? (((_Unsigned(1) << (_Size - 1)) - 1) * _Unsigned(2) + _Unsigned(1)) : 0;
370 struct _sized_integer_umax_impl<void, _Size>
373 template<
class _Signed,
class _Un
signed,
int _Size>
374 struct _max_sized_integer_min_max_impl:
375 _sized_integer_min_impl<_Signed, _Size>,
376 _sized_integer_max_impl<_Signed, _Size>,
377 _sized_integer_umax_impl<_Unsigned, _Size>
380 struct _max_sized_integer_impl
382 typedef cstdint_detail::_max_sized_integer_step<> base_type;
383 typedef base_type::signed_type signed_type;
384 typedef base_type::unsigned_type unsigned_type;
385 typedef _max_sized_integer_min_max_impl<signed_type, unsigned_type, base_type::size> min_max_impl;
393 struct _max_sized_integer:
394 _max_sized_integer_impl::type
397 template<
class _Signed,
class _Un
signed,
int _Size>
398 struct _least_sized_integer_min_max_impl:
399 _sized_integer_min_impl<_Signed, _Size>,
400 _sized_integer_max_impl<_Signed, _Size>,
401 _sized_integer_umax_impl<_Unsigned, _Size>
404 template<
class _Un
signed,
int _Size>
405 struct _least_sized_integer_min_max_impl<cstdint_detail::_cstdint_invalid_type, _Unsigned, _Size>:
406 _sized_integer_umax_impl<_Unsigned, _Size>
408 typedef cstdint_detail::_cstdint_invalid_type min_value;
409 typedef cstdint_detail::_cstdint_invalid_type max_value;
412 template<
class _Signed,
int _Size>
413 struct _least_sized_integer_min_max_impl<_Signed, cstdint_detail::_cstdint_invalid_type, _Size>:
414 _sized_integer_min_impl<_Signed, _Size>,
415 _sized_integer_max_impl<_Signed, _Size>
417 typedef cstdint_detail::_cstdint_invalid_type umax_value;
421 struct _least_sized_integer_min_max_impl<cstdint_detail::_cstdint_invalid_type, cstdint_detail::_cstdint_invalid_type, _Size>
423 typedef cstdint_detail::_cstdint_invalid_type min_value;
424 typedef cstdint_detail::_cstdint_invalid_type max_value;
425 typedef cstdint_detail::_cstdint_invalid_type umax_value;
428 template<
int _AtLeast>
429 struct _least_sized_integer_impl
431 typedef cstdint_detail::_least_sized_integer_step<_AtLeast> base_type;
432 typedef typename base_type::signed_type signed_type;
433 typedef typename base_type::unsigned_type unsigned_type;
437 _least_sized_integer_min_max_impl<signed_type, unsigned_type, base_type::size>
441 template<
int _AtLeast>
442 struct _least_sized_integer:
443 _least_sized_integer_impl<_AtLeast>::type
451 typedef detail::_least_sized_integer<8>::signed_type int_least8_t;
452 typedef detail::_least_sized_integer<8>::unsigned_type uint_least8_t;
453 typedef detail::_least_sized_integer<16>::signed_type int_least16_t;
454 typedef detail::_least_sized_integer<16>::unsigned_type uint_least16_t;
455 typedef detail::_least_sized_integer<32>::signed_type int_least32_t;
456 typedef detail::_least_sized_integer<32>::unsigned_type uint_least32_t;
457 typedef detail::_least_sized_integer<64>::signed_type int_least64_t;
458 typedef detail::_least_sized_integer<64>::unsigned_type uint_least64_t;
460 typedef int_least8_t int_fast8_t;
461 typedef int_least16_t int_fast16_t;
462 typedef int_least32_t int_fast32_t;
463 typedef int_least64_t int_fast64_t;
464 typedef uint_least8_t uint_fast8_t;
465 typedef uint_least16_t uint_fast16_t;
466 typedef uint_least32_t uint_fast32_t;
467 typedef uint_least64_t uint_fast64_t;
469 typedef detail::_max_sized_integer::signed_type intmax_t;
470 typedef detail::_max_sized_integer::unsigned_type uintmax_t;
473#if _STDEX_PLATFORM_CAN_HAVE_STD_8_BIT_INT || _STDEX_PLATFORM_CAN_HAVE_NON_STD_8_BIT_INT
474 typedef detail::_exact_sized_integer<8>::signed_type int8_t;
475 typedef detail::_exact_sized_integer<8>::unsigned_type uint8_t;
477#if _STDEX_PLATFORM_CAN_HAVE_STD_16_BIT_INT || _STDEX_PLATFORM_CAN_HAVE_NON_STD_16_BIT_INT
478 typedef detail::_exact_sized_integer<16>::signed_type int16_t;
479 typedef detail::_exact_sized_integer<16>::unsigned_type uint16_t;
481#if _STDEX_PLATFORM_CAN_HAVE_STD_32_BIT_INT || _STDEX_PLATFORM_CAN_HAVE_NON_STD_32_BIT_INT
482 typedef detail::_exact_sized_integer<32>::signed_type int32_t;
483 typedef detail::_exact_sized_integer<32>::unsigned_type uint32_t;
485#if _STDEX_PLATFORM_CAN_HAVE_STD_64_BIT_INT || _STDEX_PLATFORM_CAN_HAVE_NON_STD_64_BIT_INT
486 typedef detail::_exact_sized_integer<64>::signed_type int64_t;
487 typedef detail::_exact_sized_integer<64>::unsigned_type uint64_t;
490 typedef detail::_least_sized_integer<
sizeof(
void*) * CHAR_BIT>::signed_type intptr_t;
491 typedef detail::_least_sized_integer<
sizeof(
void*) * CHAR_BIT>::unsigned_type uintptr_t;
543#define STDEX_INTMAX_C(value) static_cast<stdex::intmax_t>(value)
544#define STDEX_UINTMAX_C(value) static_cast<stdex::uintmax_t>(value)
546#define STDEX_INT8_C(value) static_cast<stdex::int_least8_t>(value)
547#define STDEX_UINT8_C(value) static_cast<stdex::uint_least8_t>(value)
548#define STDEX_INT16_C(value) static_cast<stdex::int16_t>(value)
549#define STDEX_UINT16_C(value) static_cast<stdex::uint16_t>(value)
550#define STDEX_INT32_C(value) static_cast<stdex::int32_t>(value)
551#define STDEX_UINT32_C(value) static_cast<stdex::uint32_t>(value)
552#define STDEX_INT64_C(value) static_cast<stdex::int64_t>(value)
553#define STDEX_UINT64_C(value) static_cast<stdex::uint64_t>(value)
556#define STDEX_INT_LEAST8_MIN (stdex::detail::_least_sized_integer<8>::min_value)
557#define STDEX_INT_LEAST16_MIN (stdex::detail::_least_sized_integer<16>::min_value)
558#define STDEX_INT_LEAST32_MIN (stdex::detail::_least_sized_integer<32>::min_value)
559#define STDEX_INT_LEAST64_MIN (stdex::detail::_least_sized_integer<64>::min_value)
560#define STDEX_INT_FAST8_MIN INT_LEAST8_MIN
561#define STDEX_INT_FAST16_MIN INT_LEAST16_MIN
562#define STDEX_INT_FAST32_MIN INT_LEAST32_MIN
563#define STDEX_INT_FAST64_MIN INT_LEAST64_MIN
564#define STDEX_INTPTR_MIN (stdex::detail::_least_sized_integer<sizeof(void*) * CHAR_BIT>::min_value)
565#define STDEX_INTMAX_MIN (stdex::detail::_max_sized_integer::min_value)
568#define STDEX_INT_LEAST8_MAX (stdex::detail::_least_sized_integer<8>::max_value)
569#define STDEX_INT_LEAST16_MAX (stdex::detail::_least_sized_integer<16>::max_value)
570#define STDEX_INT_LEAST32_MAX (stdex::detail::_least_sized_integer<32>::max_value)
571#define STDEX_INT_LEAST64_MAX (stdex::detail::_least_sized_integer<64>::max_value)
572#define STDEX_INT_FAST8_MAX INT_LEAST8_MAX
573#define STDEX_INT_FAST16_MAX INT_LEAST16_MAX
574#define STDEX_INT_FAST32_MAX INT_LEAST32_MAX
575#define STDEX_INT_FAST64_MAX INT_LEAST64_MAX
576#define STDEX_INTPTR_MAX (stdex::detail::_least_sized_integer<sizeof(void*) * CHAR_BIT>::max_value)
577#define STDEX_INTMAX_MAX (stdex::detail::_max_sized_integer::max_value)
580#define STDEX_UINT_LEAST8_MAX (stdex::detail::_least_sized_integer<8>::umax_value)
581#define STDEX_UINT_LEAST16_MAX (stdex::detail::_least_sized_integer<16>::umax_value)
582#define STDEX_UINT_LEAST32_MAX (stdex::detail::_least_sized_integer<32>::umax_value)
583#define STDEX_UINT_LEAST64_MAX (stdex::detail::_least_sized_integer<64>::umax_value)
584#define STDEX_UINT_FAST8_MAX UINT_LEAST8_MAX
585#define STDEX_UINT_FAST16_MAX UINT_LEAST16_MAX
586#define STDEX_UINT_FAST32_MAX UINT_LEAST32_MAX
587#define STDEX_UINT_FAST64_MAX UINT_LEAST64_MAX
588#define STDEX_UINTPTR_MAX (stdex::detail::_least_sized_integer<sizeof(void*) * CHAR_BIT>::umax_value)
589#define STDEX_UINTMAX_MAX (stdex::detail::_max_sized_integer::umax_value)
592#if _STDEX_PLATFORM_CAN_HAVE_STD_8_BIT_INT || _STDEX_PLATFORM_CAN_HAVE_NON_STD_8_BIT_INT
597 #if _STDEX_TWO_COMPLEMENT_REPRESENTATION_IS_USED
598 #define STDEX_INT8_MIN static_cast<stdex::int8_t>(-128)
600 #define STDEX_INT8_MIN static_cast<stdex::int8_t>(-127)
602 #define STDEX_INT8_MAX static_cast<stdex::int8_t>(127)
603 #define STDEX_UINT8_MAX static_cast<stdex::uint8_t>(255)
605#if _STDEX_PLATFORM_CAN_HAVE_STD_16_BIT_INT || _STDEX_PLATFORM_CAN_HAVE_NON_STD_16_BIT_INT
610 #if _STDEX_TWO_COMPLEMENT_REPRESENTATION_IS_USED
611 #define STDEX_INT16_MIN static_cast<stdex::int16_t>(-32768)
613 #define STDEX_INT16_MIN static_cast<stdex::int16_t>(-32767)
615 #define STDEX_INT16_MAX static_cast<stdex::int16_t>(32767)
616 #define STDEX_UINT16_MAX static_cast<stdex::uint16_t>(65535)
618#if _STDEX_PLATFORM_CAN_HAVE_STD_32_BIT_INT || _STDEX_PLATFORM_CAN_HAVE_NON_STD_32_BIT_INT
623 #if _STDEX_TWO_COMPLEMENT_REPRESENTATION_IS_USED
624 #define STDEX_INT32_MIN static_cast<stdex::int32_t>(-2147483648)
626 #define STDEX_INT32_MIN static_cast<stdex::int32_t>(-2147483647)
628 #define STDEX_INT32_MAX static_cast<stdex::int32_t>(2147483647)
629 #define STDEX_UINT32_MAX static_cast<stdex::uint32_t>(4294967295)
631#if _STDEX_PLATFORM_CAN_HAVE_STD_64_BIT_INT || _STDEX_PLATFORM_CAN_HAVE_NON_STD_64_BIT_INT
636 #if _STDEX_TWO_COMPLEMENT_REPRESENTATION_IS_USED
637 #define STDEX_INT64_MIN static_cast<stdex::int64_t>(-9223372036854775808)
639 #define STDEX_INT64_MIN static_cast<stdex::int64_t>(-9223372036854775807)
641 #define STDEX_INT64_MAX static_cast<stdex::int64_t>(9223372036854775807)
642 #define STDEX_UINT64_MAX static_cast<stdex::uint64_t>(18446744073709551615)
646#undef _STDEX_TWO_COMPLEMENT_REPRESENTATION_IS_USED
647#undef _STDEX_MIN_RANGE_INT16_LOWER_BOUND
648#undef _STDEX_MIN_RANGE_INT16_UPPER_BOUND
649#undef _STDEX_MIN_RANGE_INT32_LOWER_BOUND
650#undef _STDEX_MIN_RANGE_INT32_UPPER_BOUND
651#undef _STDEX_MIN_RANGE_INT64_LOWER_BOUND
652#undef _STDEX_MIN_RANGE_INT64_UPPER_BOUND
654#undef _STDEX_SHRT_IS_IN_INT16_MAX_RANGE
655#undef _STDEX_INT_IS_IN_INT16_MAX_RANGE
657#undef _STDEX_SHRT_IS_IN_INT32_MAX_RANGE
658#undef _STDEX_INT_IS_IN_INT32_MAX_RANGE
659#undef _STDEX_LONG_IS_IN_INT32_MAX_RANGE
662#undef _STDEX_SHRT_IS_IN_INT64_MAX_RANGE
663#undef _STDEX_INT_IS_IN_INT64_MAX_RANGE
664#undef _STDEX_LONG_IS_IN_INT64_MAX_RANGE
665#undef _STDEX_LLONG_IS_IN_INT64_MAX_RANGE
667#undef _STDEX_PLATFORM_CAN_HAVE_STD_8_BIT_MULTIPLE_INT
669#undef _STDEX_PLATFORM_CAN_HAVE_STD_8_BIT_INT
670#undef _STDEX_PLATFORM_CAN_HAVE_NON_STD_8_BIT_INT
671#undef _STDEX_PLATFORM_CAN_HAVE_STD_16_BIT_INT
672#undef _STDEX_PLATFORM_CAN_HAVE_NON_STD_16_BIT_INT
673#undef _STDEX_PLATFORM_CAN_HAVE_STD_32_BIT_INT
674#undef _STDEX_PLATFORM_CAN_HAVE_NON_STD_32_BIT_INT
675#undef _STDEX_PLATFORM_CAN_HAVE_STD_64_BIT_INT
676#undef _STDEX_PLATFORM_CAN_HAVE_NON_STD_64_BIT_INT