std::numeric_limits<T>::is_exact
提供: cppreference.com
< cpp | types | numeric limits
static const bool is_exact; |
(C++11未満) | |
static constexpr bool is_exact; |
(C++11以上) | |
std::numeric_limits<T>::is_exact の値は、正確な表現を使用するすべての算術型に対して true になります。
[編集] 標準の特殊化
T
|
std::numeric_limits<T>::is_exact の値 |
/* 非特殊化 */ | 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 | false |
double | false |
long double | false |
[編集] ノート
std::numeric_limits<T>::is_exact==true である基本型 T
はすべて整数型ですが、ライブラリは整数でない正確な型、例えば分数を表現する有理算術型を定義するかもしれません。
[編集] 関連項目
[静的] |
整数型を識別します (パブリック静的メンバ定数) |
[静的] |
符号付きの型を識別します (パブリック静的メンバ定数) |
[静的] |
値の有限集合を表現する型を識別します (パブリック静的メンバ定数) |