std::numeric_limits<T>::has_signaling_NaN
來自 cppreference.com
static const bool has_signaling_NaN; |
(C++11 前) | |
static constexpr bool has_signaling_NaN; |
(C++11 起) | |
std::numeric_limits<T>::has_signaling_NaN 的值對於所有能夠表示特殊值“信令 非數字 (Not-A-Number)”的型別 T
來說都是 true。此常量對所有浮點型別都有意義,並且如果 std::numeric_limits<T>::is_iec559 == true,則保證為 true。
[編輯] 標準特化
T
|
std::numeric_limits<T>::has_signaling_NaN 的值 |
/* 未特化 */ | false |
bool | false |
char | false |
signed char | false |
unsigned char | false |
wchar_t | false |
char8_t (C++20起) | false |
char16_t (C++11起) | false |
char32_t (C++11起) | false |
short | false |
unsigned short | false |
int | false |
unsigned int | false |
long | false |
unsigned long | false |
long long (C++11起) | false |
unsigned long long (C++11起) | false |
float | 通常為 true |
double | 通常為 true |
long double | 通常為 true |
[編輯] 參閱
[靜態] |
返回給定浮點型別的安靜 NaN 值 (public static 成員函式) |
[靜態] |
確定可以表示特殊值“正無窮”的浮點型別 (public static 成員常量) |
[靜態] |
確定可以表示特殊值“安靜的非數”(quiet not-a-number,NaN)的浮點型別 (public static 成員常量) |