numeric_limits::has_signaling_NaN

测试类型是否有信号状态不是数字(NAN)的表示形式。

static const bool has_signaling_NaN = false;

返回值

true,如果该类型具有收到信号的NAN的表示形式; false,如果没有。

备注

终止的NAN不是数字的编码,信号其在表达式中存在。返回值是 trueis_iec559 为true。

示例

// numeric_limits_has_signaling_nan.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>

using namespace std;

int main( )
{
   cout << "Whether float objects have a signaling_NaN: "
        << numeric_limits<float>::has_signaling_NaN 
        << endl;
   cout << "Whether double objects have a signaling_NaN: "
        << numeric_limits<double>::has_signaling_NaN 
        << endl;
   cout << "Whether long int objects have a signaling_NaN: " 
        << numeric_limits<long int>::has_signaling_NaN 
        << endl;
}
  

要求

标头: <limits>

命名空间: std

请参见

参考

strstreambuf Class