std::numeric_limits<T>::has_quiet_NaN
来自cppreference.com
< cpp | types | numeric limits
| static const bool has_quiet_NaN; |
||
| static constexpr bool has_quiet_NaN; |
||
std::numeric_limits<T>::has_quiet_NaN 的值对所有能够表示特殊值“安静的非数”的类型 T 为 true 。此常量对所有浮点类型有意义,并保证若 std::numeric_limits<T>::is_iec559 == true 则为 true 。
标准特化
T
|
std::numeric_limits<T>::has_quiet_NaN 的值 |
| /* non-specialized */ | false |
| bool | false |
| char | false |
| signed char | false |
| unsigned char | false |
| wchar_t | false |
| char8_t | false |
| char16_t | false |
| char32_t | false |
| short | false |
| unsigned short | false |
| int | false |
| unsigned int | false |
| long | false |
| unsigned long | false |
| long long | false |
| unsigned long long | false |
| float | 通常为 true |
| double | 通常为 true |
| long double | 通常为 true |
参阅
| [静态] |
返回给定浮点类型的安静 NaN 值 (公开静态成员函数) |
| [静态] |
鉴别能表示特殊值“正无穷大”的浮点类型 (公开静态成员常量) |
| 鉴别能表示特殊值“发信的非数”( NaN )的浮点类型 (公开静态成员常量) |