Namespaces
Variants

std::numeric_limits<T>::is_bounded

来自 zh.cppreference.net
 
 
 
类型支持
基本类型
定宽整数类型 (C++11)
定宽浮点类型 (C++23)
(C++11)    
(C++17)
数值极限
C 数值极限接口
运行时类型信息
 
 
static const bool is_bounded;
(C++11 前)
static constexpr bool is_bounded;
(C++11 起)

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

标准特化

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]
标识精确类型
(公开静态成员常量)