返回安静的表示类型的不是一个数字(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;
}
要求
标头: <limits>
命名空间: std