Namespaces
Variants

Standard library header <cstdint> (C++11)

From cppreference.net
Standard library headers

Dieser Header war ursprünglich in der C-Standardbibliothek als <stdint.h> enthalten.

Dieser Header ist Teil der Type-Support -Bibliothek, stellt Fixed-Width-Integer-Typen bereit und ist Teil der C-Numerik-Grenzwert-Schnittstelle .

Inhaltsverzeichnis

Typen

int8_t int16_t int32_t int64_t
(optional)
Vorzeichenbehaftete Ganzzahltypen mit exakter Breite von jeweils 8, 16, 32 und 64 Bits
ohne Padding-Bits und unter Verwendung von 2er-Komplement für negative Werte
(bereitgestellt genau dann, wenn die Implementierung den Typ direkt unterstützt)
(typedef)
int_fast8_t int_fast16_t int_fast32_t int_fast64_t
schnellster vorzeichenbehafteter Ganzzahltyp mit einer Breite von mindestens 8, 16, 32 bzw. 64 Bits
(typedef)
int_least8_t int_least16_t int_least32_t int_least64_t
kleinster vorzeichenbehafteter Ganzzahltyp mit einer Breite von mindestens 8, 16, 32 bzw. 64 Bits
(typedef)
intmax_t
Breiteste vorzeichenbehaftete Ganzzahl
(typedef)
intptr_t
(optional)
vorzeichenbehafteter Ganzzahltyp, der in der Lage ist, einen Zeiger auf void zu halten
(typedef)
uint8_t uint16_t uint32_t uint64_t
(optional)
vorzeichenloser Ganzzahltyp mit exakter Breite von 8, 16, 32 bzw. 64 Bit
(bereitgestellt genau dann, wenn die Implementierung den Typ direkt unterstützt)
(typedef)
uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t
schnellster vorzeichenloser Ganzzahltyp mit einer Breite von mindestens 8, 16, 32 bzw. 64 Bits
(typedef)
uint_least8_t uint_least16_t uint_least32_t uint_least64_t
kleinster vorzeichenloser Ganzzahltyp mit einer Breite von mindestens 8, 16, 32 bzw. 64 Bits
(typedef)
uintmax_t
maximal breite vorzeichenloser Ganzzahltyp
(typedef)
uintptr_t
(optional)
vorzeichenloser Ganzzahltyp, der in der Lage ist, einen Zeiger auf void zu halten
(typedef)

Makros

Vorzeichenbehaftete Ganzzahlen : Mindestwert
INT8_MIN INT16_MIN INT32_MIN INT64_MIN
(optional)
Mindestwert von std::int8_t , std::int16_t , std::int32_t und std::int64_t entsprechend
(Makrokonstante)
INT_FAST8_MIN INT_FAST16_MIN INT_FAST32_MIN INT_FAST64_MIN
Mindestwert von std::int_fast8_t , std::int_fast16_t , std::int_fast32_t und std::int_fast64_t entsprechend
(Makrokonstante)
INT_LEAST8_MIN INT_LEAST16_MIN INT_LEAST32_MIN INT_LEAST64_MIN
Mindestwert von std::int_least8_t , std::int_least16_t , std::int_least32_t und std::int_least64_t entsprechend
(Makrokonstante)
INTPTR_MIN
(optional)
Mindestwert von std::intptr_t
(Makrokonstante)
INTMAX_MIN
Mindestwert von std::intmax_t
(Makrokonstante)
Vorzeichenbehaftete Ganzzahlen : Maximalwert
INT8_MAX INT16_MAX INT32_MAX INT64_MAX
(optional)
Maximalwert von std::int8_t , std::int16_t , std::int32_t und std::int64_t entsprechend
(Makrokonstante)
INT_FAST8_MAX INT_FAST16_MAX INT_FAST32_MAX INT_FAST64_MAX
Maximalwert von std::int_fast8_t , std::int_fast16_t , std::int_fast32_t und std::int_fast64_t entsprechend
(Makrokonstante)
INT_LEAST8_MAX INT_LEAST16_MAX INT_LEAST32_MAX INT_LEAST64_MAX
Maximalwert von std::int_least8_t , std::int_least16_t , std::int_least32_t und std::int_least64_t entsprechend
(Makrokonstante)
INTPTR_MAX
(optional)
Maximalwert von std::intptr_t
(Makrokonstante)
INTMAX_MAX
Maximalwert von std::intmax_t
(Makrokonstante)
Vorzeichenlose Ganzzahlen : Maximalwert
UINT8_MAX UINT16_MAX UINT32_MAX UINT64_MAX
(optional)
Maximalwert von std::uint8_t , std::uint16_t , std::uint32_t und std::uint64_t entsprechend
(Makrokonstante)
UINT_FAST8_MAX UINT_FAST16_MAX UINT_FAST32_MAX UINT_FAST64_MAX
Maximalwert von std::uint_fast8_t , std::uint_fast16_t , std::uint_fast32_t und std::uint_fast64_t entsprechend
(Makrokonstante)
UINT_LEAST8_MAX UINT_LEAST16_MAX UINT_LEAST32_MAX UINT_LEAST64_MAX
Maximalwert von std::uint_least8_t , std::uint_least16_t , std::uint_least32_t und std::uint_least64_t entsprechend
(Makrokonstante)
UINTPTR_MAX
(optional)
Maximalwert von std::uintptr_t
(Makrokonstante)
UINTMAX_MAX
Maximalwert von std::uintmax_t
(Makrokonstante)
Grenzen anderer Ganzzahltypen
PTRDIFF_MIN
(C++11)
Mindestwert von std::ptrdiff_t
(Makrokonstante)
PTRDIFF_MAX
(C++11)
Maximalwert von std::ptrdiff_t
(Makrokonstante)
SIZE_MAX
(C++11)
Maximalwert von std::size_t
(Makrokonstante)
SIG_ATOMIC_MIN
(C++11)
Mindestwert von std::sig_atomic_t
(Makrokonstante)
SIG_ATOMIC_MAX
(C++11)
Maximalwert von std::sig_atomic_t
(Makrokonstante)
WCHAR_MIN
(C++11)
Mindestwert von wchar_t
(Makrokonstante)
WCHAR_MAX
(C++11)
Maximalwert von wchar_t
(Makrokonstante)
WINT_MIN
(C++11)
Mindestwert von std::wint_t
(Makrokonstante)
WINT_MAX
(C++11)
Maximalwert von std::wint_t
(Makrokonstante)
Funktionsmakros für Integer-Konstanten
INT8_C INT16_C INT32_C INT64_C
erweitert sich zu einem ganzzahligen konstanten Ausdruck mit dem durch sein Argument spezifizierten Wert und dessen Typ der heraufgestufte Typ von std::int_least8_t , std::int_least16_t , std::int_least32_t bzw. std::int_least64_t ist
(Funktionsmakro)
INTMAX_C
erweitert sich zu einem ganzzahligen konstanten Ausdruck mit dem durch sein Argument angegebenen Wert und dem Typ std::intmax_t
(Funktionsmakro)
UINT8_C UINT16_C UINT32_C UINT64_C
erweitert sich zu einem ganzzahligen konstanten Ausdruck mit dem durch sein Argument spezifizierten Wert und dessen Typ der heraufgestufte Typ von std::uint_least8_t , std::uint_least16_t , std::uint_least32_t bzw. std::uint_least64_t ist
(Funktionsmakro)
UINTMAX_C
erweitert sich zu einem ganzzahligen konstanten Ausdruck mit dem durch sein Argument spezifizierten Wert und dem Typ std::uintmax_t
(Funktionsmakro)

Übersicht

namespace std {
  using int8_t         = /* vorzeichenbehafteter Ganzzahltyp */;   // optional
  using int16_t        = /* vorzeichenbehafteter Ganzzahltyp */;   // optional
  using int32_t        = /* vorzeichenbehafteter Ganzzahltyp */;   // optional
  using int64_t        = /* vorzeichenbehafteter Ganzzahltyp */;   // optional
  using intN_t         = /* siehe Beschreibung */;       // optional, siehe Beschreibung
  using int_fast8_t    = /* vorzeichenbehafteter Ganzzahltyp */;
  using int_fast16_t   = /* vorzeichenbehafteter Ganzzahltyp */;
  using int_fast32_t   = /* vorzeichenbehafteter Ganzzahltyp */;
  using int_fast64_t   = /* vorzeichenbehafteter Ganzzahltyp */;
  using int_fastN_t    = /* siehe Beschreibung */;       // optional, siehe Beschreibung
  using int_least8_t   = /* vorzeichenbehafteter Ganzzahltyp */;
  using int_least16_t  = /* vorzeichenbehafteter Ganzzahltyp */;
  using int_least32_t  = /* vorzeichenbehafteter Ganzzahltyp */;
  using int_least64_t  = /* vorzeichenbehafteter Ganzzahltyp */;
  using int_leastN_t   = /* siehe Beschreibung */;       // optional, siehe Beschreibung
  using intmax_t       = /* vorzeichenbehafteter Ganzzahltyp */;
  using intptr_t       = /* vorzeichenbehafteter Ganzzahltyp */;   // optional
  using uint8_t        = /* vorzeichenloser Ganzzahltyp */; // optional
  using uint16_t       = /* vorzeichenloser Ganzzahltyp */; // optional
  using uint32_t       = /* vorzeichenloser Ganzzahltyp */; // optional
  using uint64_t       = /* vorzeichenloser Ganzzahltyp */; // optional
  using uintN_t        = /* siehe Beschreibung */;       // optional, siehe Beschreibung
  using uint_fast8_t   = /* vorzeichenloser Ganzzahltyp */;
  using uint_fast16_t  = /* vorzeichenloser Ganzzahltyp */;
  using uint_fast32_t  = /* vorzeichenloser Ganzzahltyp */;
  using uint_fast64_t  = /* vorzeichenloser Ganzzahltyp */;
  using uint_fastN_t   = /* siehe Beschreibung */;       // optional, siehe Beschreibung
  using uint_least8_t  = /* vorzeichenloser Ganzzahltyp */;
  using uint_least16_t = /* vorzeichenloser Ganzzahltyp */;
  using uint_least32_t = /* vorzeichenloser Ganzzahltyp */;
  using uint_least64_t = /* vorzeichenloser Ganzzahltyp */;
  using uint_leastN_t  = /* siehe Beschreibung */;       // optional, siehe Beschreibung
  using uintmax_t      = /* vorzeichenloser Ganzzahltyp */;
  using uintptr_t      = /* vorzeichenloser Ganzzahltyp */; // optional
}
#define INTN_MIN         /* siehe Beschreibung */
#define INTN_MAX         /* siehe Beschreibung */
#define UINTN_MAX        /* siehe Beschreibung */
#define INT_FASTN_MIN    /* siehe Beschreibung */
#define INT_FASTN_MAX    /* siehe Beschreibung */
#define UINT_FASTN_MAX   /* siehe Beschreibung */
#define INT_LEASTN_MIN   /* siehe Beschreibung */
#define INT_LEASTN_MAX   /* siehe Beschreibung */
#define UINT_LEASTN_MAX  /* siehe Beschreibung */
#define INTMAX_MIN       /* siehe Beschreibung */
#define INTMAX_MAX       /* siehe Beschreibung */
#define UINTMAX_MAX      /* siehe Beschreibung */
#define INTPTR_MIN       /* siehe Beschreibung */        // optional
#define INTPTR_MAX       /* siehe Beschreibung */        // optional
#define UINTPTR_MAX      /* siehe Beschreibung */        // optional
#define PTRDIFF_MIN      /* siehe Beschreibung */
#define PTRDIFF_MAX      /* siehe Beschreibung */
#define SIZE_MAX         /* siehe Beschreibung */
#define SIG_ATOMIC_MIN   /* siehe Beschreibung */
#define SIG_ATOMIC_MAX   /* siehe Beschreibung */
#define WCHAR_MIN        /* siehe Beschreibung */
#define WCHAR_MAX        /* siehe Beschreibung */
#define WINT_MIN         /* siehe Beschreibung */
#define WINT_MAX         /* siehe Beschreibung */
#define INTN_C(value)    /* siehe Beschreibung */
#define UINTN_C(value)   /* siehe Beschreibung */
#define INTMAX_C(value)  /* siehe Beschreibung */
#define UINTMAX_C(value) /* siehe Beschreibung */