Standard library header <cstdint> (C++11)
From cppreference.net
Cet en-tête était à l'origine dans la bibliothèque standard C sous le nom de <stdint.h> .
Cet en-tête fait partie de la bibliothèque de support des types , fournissant les types entiers de largeur fixe et fait partie de l' interface des limites numériques du C .
Types |
||
|
int8_t
int16_t
int32_t
int64_t
(optionnel)
|
type entier signé d'une largeur exacte de 8, 16, 32 et 64 bits respectivement
sans bits de remplissage et utilisant le complément à 2 pour les valeurs négatives (fourni si et seulement si l'implémentation supporte directement le type) (typedef) |
|
|
int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
|
type entier signé le plus rapide avec une largeur d'au moins 8, 16, 32 et 64 bits respectivement
(typedef) |
|
|
int_least8_t
int_least16_t
int_least32_t
int_least64_t
|
plus petit type entier signé avec une largeur d'au moins 8, 16, 32 et 64 bits respectivement
(typedef) |
|
|
intmax_t
|
type entier signé de largeur maximale
(typedef) |
|
|
intptr_t
(optional)
|
type entier signé capable de contenir un pointeur vers
void
(typedef) |
|
|
uint8_t
uint16_t
uint32_t
uint64_t
(optionnel)
|
type entier non signé ayant une largeur de exactement 8, 16, 32 et 64 bits respectivement
(fourni si et seulement si l'implémentation supporte directement le type) (typedef) |
|
|
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
|
type entier non signé le plus rapide avec une largeur d'au moins 8, 16, 32 et 64 bits respectivement
(typedef) |
|
|
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
|
plus petit type entier non signé avec une largeur d'au moins 8, 16, 32 et 64 bits respectivement
(typedef) |
|
|
uintmax_t
|
type entier non signé de largeur maximale
(typedef) |
|
|
uintptr_t
(optional)
|
type entier non signé capable de contenir un pointeur vers
void
(typedef) |
|
Macros |
||
Entiers signés : valeur minimale |
||
|
INT8_MIN
INT16_MIN
INT32_MIN
INT64_MIN
(optionnel)
|
valeur minimale de
std::int8_t
,
std::int16_t
,
std::int32_t
et
std::int64_t
respectivement
(constante macro) |
|
|
INT_FAST8_MIN
INT_FAST16_MIN
INT_FAST32_MIN
INT_FAST64_MIN
|
valeur minimale de
std::int_fast8_t
,
std::int_fast16_t
,
std::int_fast32_t
et
std::int_fast64_t
respectivement
(constante macro) |
|
|
INT_LEAST8_MIN
INT_LEAST16_MIN
INT_LEAST32_MIN
INT_LEAST64_MIN
|
valeur minimale de
std::int_least8_t
,
std::int_least16_t
,
std::int_least32_t
et
std::int_least64_t
respectivement
(constante macro) |
|
|
INTPTR_MIN
(optionnel)
|
valeur minimale de
std::intptr_t
(constante macro) |
|
|
INTMAX_MIN
|
valeur minimale de
std::intmax_t
(constante macro) |
|
Entiers signés : valeur maximale |
||
|
INT8_MAX
INT16_MAX
INT32_MAX
INT64_MAX
(optionnel)
|
valeur maximale de
std::int8_t
,
std::int16_t
,
std::int32_t
et
std::int64_t
respectivement
(constante macro) |
|
|
INT_FAST8_MAX
INT_FAST16_MAX
INT_FAST32_MAX
INT_FAST64_MAX
|
valeur maximale de
std::int_fast8_t
,
std::int_fast16_t
,
std::int_fast32_t
et
std::int_fast64_t
respectivement
(constante macro) |
|
|
INT_LEAST8_MAX
INT_LEAST16_MAX
INT_LEAST32_MAX
INT_LEAST64_MAX
|
valeur maximale de
std::int_least8_t
,
std::int_least16_t
,
std::int_least32_t
et
std::int_least64_t
respectivement
(constante macro) |
|
|
INTPTR_MAX
(optionnel)
|
valeur maximale de
std::intptr_t
(constante macro) |
|
|
INTMAX_MAX
|
valeur maximale de
std::intmax_t
(constante macro) |
|
Entiers non signés : valeur maximale |
||
|
UINT8_MAX
UINT16_MAX
UINT32_MAX
UINT64_MAX
(optionnel)
|
valeur maximale de
std::uint8_t
,
std::uint16_t
,
std::uint32_t
et
std::uint64_t
respectivement
(constante macro) |
|
|
UINT_FAST8_MAX
UINT_FAST16_MAX
UINT_FAST32_MAX
UINT_FAST64_MAX
|
valeur maximale de
std::uint_fast8_t
,
std::uint_fast16_t
,
std::uint_fast32_t
et
std::uint_fast64_t
respectivement
(constante macro) |
|
|
UINT_LEAST8_MAX
UINT_LEAST16_MAX
UINT_LEAST32_MAX
UINT_LEAST64_MAX
|
valeur maximale de
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
et
std::uint_least64_t
respectivement
(constante macro) |
|
|
UINTPTR_MAX
(optionnel)
|
valeur maximale de
std::uintptr_t
(constante macro) |
|
|
UINTMAX_MAX
|
valeur maximale de
std::uintmax_t
(constante macro) |
|
Limites des autres types entiers |
||
|
PTRDIFF_MIN
(C++11)
|
valeur minimale de
std::ptrdiff_t
(constante macro) |
|
|
PTRDIFF_MAX
(C++11)
|
valeur maximale de
std::ptrdiff_t
(constante macro) |
|
|
SIZE_MAX
(C++11)
|
valeur maximale de
std::size_t
(constante macro) |
|
|
SIG_ATOMIC_MIN
(C++11)
|
valeur minimale de
std::sig_atomic_t
(constante macro) |
|
|
SIG_ATOMIC_MAX
(C++11)
|
valeur maximale de
std::sig_atomic_t
(constante macro) |
|
|
WCHAR_MIN
(C++11)
|
valeur minimale de
wchar_t
(constante macro) |
|
|
WCHAR_MAX
(C++11)
|
valeur maximale de
wchar_t
(constante macro) |
|
|
WINT_MIN
(C++11)
|
valeur minimale de
std::wint_t
(constante macro) |
|
|
WINT_MAX
(C++11)
|
valeur maximale de
std::wint_t
(constante macro) |
|
Macros de fonction pour les constantes entières |
||
|
INT8_C
INT16_C
INT32_C
INT64_C
|
s'étend en une expression constante entière ayant la valeur spécifiée par son argument et dont le type est le
type promu
de
std::int_least8_t
,
std::int_least16_t
,
std::int_least32_t
et
std::int_least64_t
respectivement
(macro de fonction) |
|
|
INTMAX_C
|
s'étend en une expression constante entière ayant la valeur spécifiée par son argument et le type
std::intmax_t
(macro fonction) |
|
|
UINT8_C
UINT16_C
UINT32_C
UINT64_C
|
s'étend en une expression constante entière ayant la valeur spécifiée par son argument et dont le type est le
type promu
de
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
et
std::uint_least64_t
respectivement
(macro de fonction) |
|
|
UINTMAX_C
|
s'étend en une expression constante entière ayant la valeur spécifiée par son argument et le type
std::uintmax_t
(macro de fonction) |
|
Synopsis
namespace std { using int8_t = /* type entier signé */; // optionnel using int16_t = /* type entier signé */; // optionnel using int32_t = /* type entier signé */; // optionnel using int64_t = /* type entier signé */; // optionnel using intN_t = /* voir description */; // optionnel, voir description using int_fast8_t = /* type entier signé */; using int_fast16_t = /* type entier signé */; using int_fast32_t = /* type entier signé */; using int_fast64_t = /* type entier signé */; using int_fastN_t = /* voir description */; // optionnel, voir description using int_least8_t = /* type entier signé */; using int_least16_t = /* type entier signé */; using int_least32_t = /* type entier signé */; using int_least64_t = /* type entier signé */; using int_leastN_t = /* voir description */; // optionnel, voir description using intmax_t = /* type entier signé */; using intptr_t = /* type entier signé */; // optionnel using uint8_t = /* type entier non signé */; // optionnel using uint16_t = /* type entier non signé */; // optionnel using uint32_t = /* type entier non signé */; // optionnel using uint64_t = /* type entier non signé */; // optionnel using uintN_t = /* voir description */; // optionnel, voir description using uint_fast8_t = /* type entier non signé */; using uint_fast16_t = /* type entier non signé */; using uint_fast32_t = /* type entier non signé */; using uint_fast64_t = /* type entier non signé */; using uint_fastN_t = /* voir description */; // optionnel, voir description using uint_least8_t = /* type entier non signé */; using uint_least16_t = /* type entier non signé */; using uint_least32_t = /* type entier non signé */; using uint_least64_t = /* type entier non signé */; using uint_leastN_t = /* voir description */; // optionnel, voir description using uintmax_t = /* type entier non signé */; using uintptr_t = /* type entier non signé */; // optionnel } #define INTN_MIN /* voir description */ #define INTN_MAX /* voir description */ #define UINTN_MAX /* voir description */ #define INT_FASTN_MIN /* voir description */ #define INT_FASTN_MAX /* voir description */ #define UINT_FASTN_MAX /* voir description */ #define INT_LEASTN_MIN /* voir description */ #define INT_LEASTN_MAX /* voir description */ #define UINT_LEASTN_MAX /* voir description */ #define INTMAX_MIN /* voir description */ #define INTMAX_MAX /* voir description */ #define UINTMAX_MAX /* voir description */ #define INTPTR_MIN /* voir description */ // optionnel #define INTPTR_MAX /* voir description */ // optionnel #define UINTPTR_MAX /* voir description */ // optionnel #define PTRDIFF_MIN /* voir description */ #define PTRDIFF_MAX /* voir description */ #define SIZE_MAX /* voir description */ #define SIG_ATOMIC_MIN /* voir description */ #define SIG_ATOMIC_MAX /* voir description */ #define WCHAR_MIN /* voir description */ #define WCHAR_MAX /* voir description */ #define WINT_MIN /* voir description */ #define WINT_MAX /* voir description */ #define INTN_C(value) /* voir description */ #define UINTN_C(value) /* voir description */ #define INTMAX_C(value) /* voir description */ #define UINTMAX_C(value) /* voir description */