命名空间
变体
操作

std::numeric_limits<T>::is_bounded

来自 cppreference.cn
 
 
 
 
 
static const bool is_bounded;
(until C++11)
static constexpr bool is_bounded;
(since C++11)

对于所有表示有限值集的算术类型 Tstd::numeric_limits<T>::is_bounded 的值为 true。虽然所有基本类型都是有界的,但对于库提供的任意精度算术类型的 std::numeric_limits 的特化,此常量将为 false

[编辑] 标准特化

T std::numeric_limits<T>::is_bounded 的值
/* non-specialized */ false
bool true
char true
signed char true
unsigned char true
wchar_t true
char8_t (since C++20) true
char16_t (since C++11) true
char32_t (since C++11) true
short true
unsigned short true
int true
unsigned int true
long true
unsigned long true
long long (since C++11) true
unsigned long long (since C++11) true
float true
double true
long double true

[编辑] 参见

[static]
标识整数类型
(public static member constant) [编辑]
[static]
标识有符号类型
(public static member constant) [编辑]
[static]
标识精确类型
(public static member constant) [编辑]