Freigeben über


numeric_limits::has_infinity

Testet, ob ein Typ eine Darstellung für " unendlich ist.

static const bool has_infinity = false;

Rückgabewert

true, wenn der Typ eine Darstellung für " unendlich hat; false wenn nicht.

Hinweise

Der Member gibt true zurück, wenn is_iec559true ist.

Beispiel

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

using namespace std;

int main( )
{
   cout << "Whether float objects have infinity: "
        << numeric_limits<float>::has_infinity
        << endl;
   cout << "Whether double objects have infinity: "
        << numeric_limits<double>::has_infinity
        << endl;
   cout << "Whether long int objects have infinity: " 
        << numeric_limits<long int>::has_infinity
        << endl;
}
  

Anforderungen

Grenzen Header: <>

Namespace: std

Siehe auch

Referenz

strstreambuf-Klasse