numeric_limits::has_quiet_NaN

测试类型是否具有沉寂非数值 (NAN) 的一个表示形式,nonsignaling。

static const bool has_quiet_NaN = false;

返回值

true,如果 类型 的 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;
}
  

要求

页眉: <限制>

命名空间: std

请参见

参考

strstreambuf 类