测试,如果类型具有一个签名的表示形式。
static const bool is_signed = false;
返回值
true,如果类型具有一个签名的表示形式;false,则不是。
备注
成员存储 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;
}
要求
页眉: <限制>
命名空间: std