std::numeric_limits<T>::is_bounded
来自 cppreference.cn
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 成员常量) |