numeric_limits::is_modulo

测试,如果 类型 具有一个相表示。

static const bool is_modulo = false;

返回值

true,如果类型具有一个相表示形式;false,则不是。

备注

取模是表示所有结果为 out Modulo 一些值的表示形式。 任何预定义的无符号整数类型具有一个相表示。

示例

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

using namespace std;

int main( )
{
   cout << "Whether float objects have a modulo representation: "
        << numeric_limits<float>::is_modulo
        << endl;
   cout << "Whether double objects have a modulo representation: "
        << numeric_limits<double>::is_modulo
        << endl;
   cout << "Whether signed char objects have a modulo representation: "
        << numeric_limits<signed char>::is_modulo
        << endl;
   cout << "Whether unsigned char objects have a modulo representation: "
        << numeric_limits<unsigned char>::is_modulo
        << endl;
}
  

要求

页眉: <限制>

命名空间: std

请参见

参考

strstreambuf 类