std::numeric_limits<T>::is_bounded
來自 cppreference.com
static const bool is_bounded; |
(C++11 前) | |
static constexpr bool is_bounded; |
(C++11 起) | |
std::numeric_limits<T>::is_bounded 的值為 true ,對於所有表示有限值集的算術型別 T
而言。雖然所有基本型別都是有界的,但對於庫提供的任意精度算術型別的 std::numeric_limits 特化,此常量將為 false。
[編輯] 標準特化
T
|
std::numeric_limits<T>::is_bounded 的值 |
/* 未特化 */ | 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 |
[編輯] 參閱
[靜態] |
確定整數型別 (public static 成員常量) |
[靜態] |
確定有符號型別 (public static 成員常量) |
[靜態] |
確定精確型別 (public static 成員常量) |