type に二つの表示状態を持つテスト。
static const bool is_modulo = false;
戻り値
型に二つの表現である場合true ; false それ以外の場合は。
解説
二つの表示は、すべての結果が、切り捨てモジュロ値の表現です。定義済みのすべての符号なし整数型に二つの形式があります。
使用例
// numeric_limits_is_modulo.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << "Whether float objects have a modulo representation: "
<< numeric_limits<float>::is_modulo
<< endl;
cout << "Whether double objects have a modulo representation: "
<< numeric_limits<double>::is_modulo
<< endl;
cout << "Whether signed char objects have a modulo representation: "
<< numeric_limits<signed char>::is_modulo
<< endl;
cout << "Whether unsigned char objects have a modulo representation: "
<< numeric_limits<unsigned char>::is_modulo
<< endl;
}
必要条件
ヘッダー: <limits>
名前空間: std