std::numeric_limits<T>::is_exact
ja.cppreference.net より
static const bool is_exact;
|
(C++11未満) | |
static constexpr bool is_exact;
|
(C++11以上) | |
値 std::numeric_limits<T>::is_exact は、正確な表現を使用するすべての算術型 true に対して T です。
標準特殊化
T
|
std:: numeric_limits < T > :: is_exact の値 |
| /* non-specialized */ | 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 |
注記
T
が
std::
numeric_limits
<
T
>
::
is_exact
==
true
であるすべての基本型は整数型ですが、ライブラリは整数ではない正確な型を定義することができます。例えば、分数を表す有理数演算型などです。
関連項目
|
[static]
|
整数型を識別する
(public static member constant) |
|
[static]
|
符号付き型を識別する
(public static member constant) |
|
[static]
|
有限の値の集合を表す型を識別する
(public static member constant) |