numeric_limits::is_modulo

測試,如果 type 具有模數表示。

static const bool is_modulo = false;

傳回值

true ,如果型別具有模數表示; false ,否則為。

備註

模數表示是所有結果是減少的模數某些值的表示。所有預先定義的不帶正負號的整數 (Unsigned Integer) 型別具有模數表示。

範例

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

需求

標題: <limits>

命名空間: std

請參閱

參考

strstreambuf Class