Standard library header <cstdint> (C++11)
From cppreference.net
Este encabezado estaba originalmente en la biblioteca estándar de C como <stdint.h> .
Este encabezado es parte de la biblioteca de soporte de tipos , proporcionando tipos de enteros de ancho fijo y parte de la interfaz de límites numéricos de C .
Tipos |
||
|
int8_t
int16_t
int32_t
int64_t
(opcional)
|
tipo entero con signo con ancho de exactamente 8, 16, 32 y 64 bits respectivamente
sin bits de relleno y usando complemento a 2 para valores negativos (proporcionado si y solo si la implementación soporta directamente el tipo) (typedef) |
|
|
int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
|
tipo de entero con signo más rápido con ancho de al menos 8, 16, 32 y 64 bits respectivamente
(typedef) |
|
|
int_least8_t
int_least16_t
int_least32_t
int_least64_t
|
tipo entero con signo más pequeño con un ancho de al menos 8, 16, 32 y 64 bits respectivamente
(typedef) |
|
|
intmax_t
|
tipo entero con signo de ancho máximo
(typedef) |
|
|
intptr_t
(opcional)
|
tipo entero con signo capaz de contener un puntero a
void
(typedef) |
|
|
uint8_t
uint16_t
uint32_t
uint64_t
(opcional)
|
tipo entero sin signo con ancho de exactamente 8, 16, 32 y 64 bits respectivamente
(proporcionado si y solo si la implementación soporta directamente el tipo) (typedef) |
|
|
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
|
tipo entero sin signo más rápido con ancho de al menos 8, 16, 32 y 64 bits respectivamente
(typedef) |
|
|
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
|
tipo entero sin signo más pequeño con un ancho de al menos 8, 16, 32 y 64 bits respectivamente
(typedef) |
|
|
uintmax_t
|
tipo entero sin signo de ancho máximo
(typedef) |
|
|
uintptr_t
(optional)
|
tipo entero sin signo capaz de contener un puntero a
void
(typedef) |
|
Macros |
||
Enteros con signo : valor mínimo |
||
|
INT8_MIN
INT16_MIN
INT32_MIN
INT64_MIN
(opcional)
|
valor mínimo de
std::int8_t
,
std::int16_t
,
std::int32_t
y
std::int64_t
respectivamente
(constante macro) |
|
|
INT_FAST8_MIN
INT_FAST16_MIN
INT_FAST32_MIN
INT_FAST64_MIN
|
valor mínimo de
std::int_fast8_t
,
std::int_fast16_t
,
std::int_fast32_t
y
std::int_fast64_t
respectivamente
(constante macro) |
|
|
INT_LEAST8_MIN
INT_LEAST16_MIN
INT_LEAST32_MIN
INT_LEAST64_MIN
|
valor mínimo de
std::int_least8_t
,
std::int_least16_t
,
std::int_least32_t
y
std::int_least64_t
respectivamente
(constante macro) |
|
|
INTPTR_MIN
(opcional)
|
valor mínimo de
std::intptr_t
(constante macro) |
|
|
INTMAX_MIN
|
valor mínimo de
std::intmax_t
(constante macro) |
|
Enteros con signo : valor máximo |
||
|
INT8_MAX
INT16_MAX
INT32_MAX
INT64_MAX
(opcional)
|
valor máximo de
std::int8_t
,
std::int16_t
,
std::int32_t
y
std::int64_t
respectivamente
(constante macro) |
|
|
INT_FAST8_MAX
INT_FAST16_MAX
INT_FAST32_MAX
INT_FAST64_MAX
|
valor máximo de
std::int_fast8_t
,
std::int_fast16_t
,
std::int_fast32_t
y
std::int_fast64_t
respectivamente
(constante macro) |
|
|
INT_LEAST8_MAX
INT_LEAST16_MAX
INT_LEAST32_MAX
INT_LEAST64_MAX
|
valor máximo de
std::int_least8_t
,
std::int_least16_t
,
std::int_least32_t
y
std::int_least64_t
respectivamente
(constante macro) |
|
|
INTPTR_MAX
(opcional)
|
valor máximo de
std::intptr_t
(constante macro) |
|
|
INTMAX_MAX
|
valor máximo de
std::intmax_t
(constante macro) |
|
Enteros sin signo : valor máximo |
||
|
UINT8_MAX
UINT16_MAX
UINT32_MAX
UINT64_MAX
(opcional)
|
valor máximo de
std::uint8_t
,
std::uint16_t
,
std::uint32_t
y
std::uint64_t
respectivamente
(constante macro) |
|
|
UINT_FAST8_MAX
UINT_FAST16_MAX
UINT_FAST32_MAX
UINT_FAST64_MAX
|
valor máximo de
std::uint_fast8_t
,
std::uint_fast16_t
,
std::uint_fast32_t
y
std::uint_fast64_t
respectivamente
(constante macro) |
|
|
UINT_LEAST8_MAX
UINT_LEAST16_MAX
UINT_LEAST32_MAX
UINT_LEAST64_MAX
|
valor máximo de
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
y
std::uint_least64_t
respectivamente
(constante macro) |
|
|
UINTPTR_MAX
(optional)
|
valor máximo de
std::uintptr_t
(constante macro) |
|
|
UINTMAX_MAX
|
valor máximo de
std::uintmax_t
(constante macro) |
|
Límites de otros tipos enteros |
||
|
PTRDIFF_MIN
(C++11)
|
valor mínimo de
std::ptrdiff_t
(constante macro) |
|
|
PTRDIFF_MAX
(C++11)
|
valor máximo de
std::ptrdiff_t
(constante macro) |
|
|
SIZE_MAX
(C++11)
|
valor máximo de
std::size_t
(constante macro) |
|
|
SIG_ATOMIC_MIN
(C++11)
|
valor mínimo de
std::sig_atomic_t
(constante macro) |
|
|
SIG_ATOMIC_MAX
(C++11)
|
valor máximo de
std::sig_atomic_t
(constante macro) |
|
|
WCHAR_MIN
(C++11)
|
valor mínimo de
wchar_t
(constante macro) |
|
|
WCHAR_MAX
(C++11)
|
valor máximo de
wchar_t
(constante macro) |
|
|
WINT_MIN
(C++11)
|
valor mínimo de
std::wint_t
(constante macro) |
|
|
WINT_MAX
(C++11)
|
valor máximo de
std::wint_t
(constante macro) |
|
Macros de función para constantes enteras |
||
|
INT8_C
INT16_C
INT32_C
INT64_C
|
se expande a una expresión constante entera que tiene el valor especificado por su argumento y cuyo tipo es el
tipo promovido
de
std::int_least8_t
,
std::int_least16_t
,
std::int_least32_t
y
std::int_least64_t
respectivamente
(macro de función) |
|
|
INTMAX_C
|
se expande a una expresión constante entera con el valor especificado por su argumento y el tipo
std::intmax_t
(macro de función) |
|
|
UINT8_C
UINT16_C
UINT32_C
UINT64_C
|
se expande a una expresión constante entera que tiene el valor especificado por su argumento y cuyo tipo es el
tipo promovido
de
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
y
std::uint_least64_t
respectivamente
(macro de función) |
|
|
UINTMAX_C
|
se expande a una expresión constante entera que tiene el valor especificado por su argumento y el tipo
std::uintmax_t
(macro de función) |
|
Sinopsis
namespace std { using int8_t = /* tipo entero con signo */; // opcional using int16_t = /* tipo entero con signo */; // opcional using int32_t = /* tipo entero con signo */; // opcional using int64_t = /* tipo entero con signo */; // opcional using intN_t = /* ver descripción */; // opcional, ver descripción using int_fast8_t = /* tipo entero con signo */; using int_fast16_t = /* tipo entero con signo */; using int_fast32_t = /* tipo entero con signo */; using int_fast64_t = /* tipo entero con signo */; using int_fastN_t = /* ver descripción */; // opcional, ver descripción using int_least8_t = /* tipo entero con signo */; using int_least16_t = /* tipo entero con signo */; using int_least32_t = /* tipo entero con signo */; using int_least64_t = /* tipo entero con signo */; using int_leastN_t = /* ver descripción */; // opcional, ver descripción using intmax_t = /* tipo entero con signo */; using intptr_t = /* tipo entero con signo */; // opcional using uint8_t = /* tipo entero sin signo */; // opcional using uint16_t = /* tipo entero sin signo */; // opcional using uint32_t = /* tipo entero sin signo */; // opcional using uint64_t = /* tipo entero sin signo */; // opcional using uintN_t = /* ver descripción */; // opcional, ver descripción using uint_fast8_t = /* tipo entero sin signo */; using uint_fast16_t = /* tipo entero sin signo */; using uint_fast32_t = /* tipo entero sin signo */; using uint_fast64_t = /* tipo entero sin signo */; using uint_fastN_t = /* ver descripción */; // opcional, ver descripción using uint_least8_t = /* tipo entero sin signo */; using uint_least16_t = /* tipo entero sin signo */; using uint_least32_t = /* tipo entero sin signo */; using uint_least64_t = /* tipo entero sin signo */; using uint_leastN_t = /* ver descripción */; // opcional, ver descripción using uintmax_t = /* tipo entero sin signo */; using uintptr_t = /* tipo entero sin signo */; // opcional } #define INTN_MIN /* ver descripción */ #define INTN_MAX /* ver descripción */ #define UINTN_MAX /* ver descripción */ #define INT_FASTN_MIN /* ver descripción */ #define INT_FASTN_MAX /* ver descripción */ #define UINT_FASTN_MAX /* ver descripción */ #define INT_LEASTN_MIN /* ver descripción */ #define INT_LEASTN_MAX /* ver descripción */ #define UINT_LEASTN_MAX /* ver descripción */ #define INTMAX_MIN /* ver descripción */ #define INTMAX_MAX /* ver descripción */ #define UINTMAX_MAX /* ver descripción */ #define INTPTR_MIN /* ver descripción */ // opcional #define INTPTR_MAX /* ver descripción */ // opcional #define UINTPTR_MAX /* ver descripción */ // opcional #define PTRDIFF_MIN /* ver descripción */ #define PTRDIFF_MAX /* ver descripción */ #define SIZE_MAX /* ver descripción */ #define SIG_ATOMIC_MIN /* ver descripción */ #define SIG_ATOMIC_MAX /* ver descripción */ #define WCHAR_MIN /* ver descripción */ #define WCHAR_MAX /* ver descripción */ #define WINT_MIN /* ver descripción */ #define WINT_MAX /* ver descripción */ #define INTN_C(value) /* ver descripción */ #define UINTN_C(value) /* ver descripción */ #define INTMAX_C(value) /* ver descripción */ #define UINTMAX_C(value) /* ver descripción */