Namespaces
Variants

std::numeric_limits<T>:: is_bounded

From cppreference.net
Utilities library
static const bool is_bounded ;
(C++11 前)
static constexpr bool is_bounded ;
(C++11 起)

当算术类型 T 表示有限值集合时, std:: 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 (自 C++20 起) true
char16_t (自 C++11 起) true
char32_t (自 C++11 起) true
short true
unsigned short true
int true
unsigned int true
long true
unsigned long true
long long (自 C++11 起) true
unsigned long long (自 C++11 起) true
float true
double true
long double true

参见

[static]
标识整数类型
(公开静态成员常量)
[static]
标识有符号类型
(公开静态成员常量)
[static]
标识精确类型
(公开静态成员常量)