型の表示に使用する基数と呼ばれる必要な条件を返します。
static const int radix = 0;
戻り値
型の参照範囲に必要な条件。
解説
基本クラスは、定義された整数型の場合は 2、および指数部が発生する、または定義済みの浮動小数点型の FLT_RADIX、基本クラスです。
使用例
// numeric_limits_radix.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << "The base for type float is: "
<< numeric_limits<float>::radix
<< endl;
cout << "The base for type int is: "
<< numeric_limits<int>::radix
<< endl;
cout << "The base for type long double is: "
<< numeric_limits<long double>::radix
<< endl;
}
必要条件
ヘッダー: <limits>
名前空間: std