std::max_align_t
Aus cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
definiert in Header <cstddef>
|
||
typedef /*implementation-defined*/ max_align_t; |
(seit C++11) | |
std::max_align_t ist ein POD-Typ, deren Ausrichtung Voraussetzung ist mindestens so streng sind (so groß) wie jeder skalaren Typ .
Original:
std::max_align_t is a POD type whose alignment requirement is at least as strict (as large) as that of every scalar type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Notes
Pointers wieder durch Zuweisung Funktionen wie std::malloc in geeigneter Weise für jedes Objekt ausgerichtet, was bedeutet, dass sie mindestens so streng wie std::max_align_t ausgerichtet sind .
Original:
Pointers returned by allocation functions such as std::malloc are suitably aligned for any object, which means they are aligned at least as strict as std::max_align_t.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
std::max_align_t ist in der Regel gleichbedeutend mit dem größten skalaren Typs, die long double ist auf den meisten Plattformen und seine Ausrichtung Voraussetzung ist entweder 8 oder 16 .
Original:
std::max_align_t is usually synonymous with the largest scalar type, which is long double on most platforms, and its alignment requirement is either 8 or 16.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Beispiel
#include <iostream> #include <cstddef> int main() { std::cout << alignof(std::max_align_t) << '\n'; }
Output:
16
[Bearbeiten] Siehe auch
alignof operator | queries alignment requirements of a type (seit C++11) |
(C++11) |
Ruft den Type der Alignment-Anforderungen Original: obtains the type's alignment requirements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template) |
(C++11) |
prüft, ob ein Typ ist skalaren Typ Original: checks if a type is scalar type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template) |