测试类型是否具有安静的一个表示不是数字(NAN),nonsignaling。
static const bool has_quiet_NaN = false;
返回值
true,如果 type 具有安静NAN的表示形式; false,如果没有。
备注
安静NAN不是数字的编码,而信号其在表达式中存在。如果 is_iec559 为true,则返回值是 true。
示例
// numeric_limits_has_quiet_nan.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << "Whether float objects have quiet_NaN: "
<< numeric_limits<float>::has_quiet_NaN
<< endl;
cout << "Whether double objects have quiet_NaN: "
<< numeric_limits<double>::has_quiet_NaN
<< endl;
cout << "Whether long int objects have quiet_NaN: "
<< numeric_limits<long int>::has_quiet_NaN
<< endl;
}
要求
标头: <limits>
命名空间: std