型に署名できる場合はテスト。
static const bool is_signed = false;
戻り値
型に署名できる場合はtrue ; false それ以外の場合は。
解説
メンバーは定義済みのすべての浮動小数点と符号付き整数型のボックスで、signed 型の表現である場合に true を格納します。
使用例
// numeric_limits_is_signaled.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << "Whether float objects have a signed representation: "
<< numeric_limits<float>::is_signed
<< endl;
cout << "Whether double objects have a signed representation: "
<< numeric_limits<double>::is_signed
<< endl;
cout << "Whether signed char objects have a signed representation: "
<< numeric_limits<signed char>::is_signed
<< endl;
cout << "Whether unsigned char objects have a signed representation: "
<< numeric_limits<unsigned char>::is_signed
<< endl;
}
必要条件
ヘッダー: <limits>
名前空間: std