numeric_limits::is_bounded

测试,如果类型能表示的值集是有限的。

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;
}
  

要求

页眉: <限制>

命名空间: std

请参见

参考

strstreambuf 类