Compartir a través de


numeric_limits::is_signed

Prueba si un tipo tiene una representación firmado.

static const bool is_signed = false;

Valor devuelto

true si el tipo tiene una representación firmado; false si no.

Comentarios

El miembro almacena true para un tipo que tiene una representación firmado, que es el caso para tipos enteros y de punto flotante con signo todo predefinidos.

Ejemplo

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

using namespace std;

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

Requisitos

límites <deEncabezado: >

Espacio de nombres: std

Vea también

Referencia

strstreambuf (Clase)