返回沉寂非数值 (NAN) 的表示形式的类型。
static Type quiet_NaN( ) throw( );
返回值
一清扫的 NAN 的表示形式的类型。
备注
在 has_quiet_NaN 为 true,则返回值是有意义的。
示例
// numeric_limits_quiet_nan.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << "The quiet NaN for type float is: "
<< numeric_limits<float>::quiet_NaN( )
<< endl;
cout << "The quiet NaN for type int is: "
<< numeric_limits<int>::quiet_NaN( )
<< endl;
cout << "The quiet NaN for type long double is: "
<< numeric_limits<long double>::quiet_NaN( )
<< endl;
}
要求
页眉: <限制>
命名空间: std