Partager via


numeric_limits::is_integer

Teste si le type est a une représentation entière.

static const bool is_integer = false;

Valeur de retour

true si le type a une représentation entière ; false dans le cas contraire.

Notes

Tous les types d'entiers prédéfinis ont une représentation entière.

Exemple

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

using namespace std;

int main( )
{
   cout << "Whether float objects have an integral representation: "
        << numeric_limits<float>::is_integer
        << endl;
   cout << "Whether double objects have an integral representation: "
        << numeric_limits<double>::is_integer
        << endl;
   cout << "Whether int objects have an integral representation: "
        << numeric_limits<int>::is_integer
        << endl;
   cout << "Whether unsigned char objects have an integral representation: "
        << numeric_limits<unsigned char>::is_integer
        << endl;
}
  

Configuration requise

En-tête : <limites>

Espace de noms : std

Voir aussi

Référence

strstreambuf, classe