28 #ifndef YB_INC_ystdex_cstdint_hpp_
29 #define YB_INC_ystdex_cstdint_hpp_ 1
42 template<
typename _tInt>
43 struct integer_width : integral_constant<size_t, sizeof(_tInt) * CHAR_BIT>
53 template<
typename _type,
bool>
59 template<
typename _type>
74 template<
size_t _vW
idth>
77 static_assert(_vWidth <= 64,
"Width too large found.");
80 : (_vWidth <= 16U ? 16U : (_vWidth <= 32U ? 32U : 64U)))>::fast_type;
82 : (_vWidth <= 16U ? 16U : (_vWidth <= 32U ? 32U : 64U)))>
85 : (_vWidth <= 16U ? 16U : (_vWidth <= 32U ? 32U : 64U)))>::least_type;
87 : (_vWidth <= 16U ? 16U : (_vWidth <= 32U ? 32U : 64U)))>
145 template<
typename _type>
149 ? std::numeric_limits<_type>::max() : _type(0);
158 template<
typename _type1,
typename _type2>
160 _type1>::value) != 0 && uintmax_t(modular_arithmetic<_type1>::value)
161 == uintmax_t(modular_arithmetic<_type2>::value)>
typename make_unsigned< _type >::type make_unsigned_t
std::uint_fast64_t unsigned_fast_type
std::uint_least8_t unsigned_least_type
std::uint8_t unsigned_type
std::uint_fast32_t unsigned_fast_type
typename make_width_int<(_vWidth<=8U?8U:(_vWidth<=16U?16U:(_vWidth<=32U?32U:64U)))>::unsigned_fast_type unsigned_fast_type
std::uint64_t unsigned_type
std::int_fast64_t fast_type
std::int_least16_t least_type
std::int_fast8_t fast_type
std::int_fast16_t fast_type
std::int_least64_t least_type
std::uint16_t unsigned_type
typename make_width_int<(_vWidth<=8U?8U:(_vWidth<=16U?16U:(_vWidth<=32U?32U:64U)))>::least_type least_type
std::uint_least64_t unsigned_least_type
typename make_signed< _type >::type make_signed_t
取指定整数类型和条件表达式对应的有符号或无符号整数类型。
std::int_fast32_t fast_type
std::uint_least32_t unsigned_least_type
make_signed_t< _type > type
std::int_least8_t least_type
std::int_least32_t least_type
typename make_width_int<(_vWidth<=8U?8U:(_vWidth<=16U?16U:(_vWidth<=32U?32U:64U)))>::unsigned_least_type unsigned_least_type
std::uint_fast16_t unsigned_fast_type
std::uint_least16_t unsigned_least_type
std::uint_fast8_t unsigned_fast_type
#define yconstexpr
指定编译时常量表达式。
typename make_width_int<(_vWidth<=8U?8U:(_vWidth<=16U?16U:(_vWidth<=32U?32U:64U)))>::fast_type fast_type
make_unsigned_t< _type > type
std::uint32_t unsigned_type