std::numeric_limits<T>::has_quiet_NaN
來自 cppreference.com
static const bool has_quiet_NaN; |
(C++11 前) | |
| static constexpr bool has_quiet_NaN; |
(C++11 起) | |
std::numeric_limits<T>::has_quiet_NaN 的值為 true ,對於所有能夠表示特殊值“安靜 非數字 (Not-A-Number)”的型別 T。此常數對於所有浮點型別都有意義,並且如果 std::numeric_limits<T>::is_iec559 == true,則保證為 true。
[編輯] 標準特化
T
|
std::numeric_limits<T>::has_quiet_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 member function) |
| [靜態] |
確定可以表示特殊值“正無窮”的浮點型別 (public static member constant) |
| 確定可以表示特殊值“發信的非數”(signaling not-a-number,NaN)的浮點型別 (public static member constant) |