如果该设置的值类型可以表示是有限的,测试。
static const bool is_bounded = false;
返回值
true,如果有许多的类型设置可以可用的值; false,如果没有。
备注
有许多的所有预定义的类型设置可以可用的值并返回 true。
示例
// numeric_limits_is_bounded.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << "Whether float objects have bounded set "
<< "of representable values: "
<< numeric_limits<float>::is_bounded
<< endl;
cout << "Whether double objects have bounded set "
<< "of representable values: "
<< numeric_limits<double>::is_bounded
<< endl;
cout << "Whether long int objects have bounded set "
<< "of representable values: "
<< numeric_limits<long int>::is_bounded
<< endl;
cout << "Whether unsigned char objects have bounded set "
<< "of representable values: "
<< numeric_limits<unsigned char>::is_bounded
<< endl;
}
要求
标头: <limits>
命名空间: std