std::max_align_t – cppreference.com
Aus cppreference.com
<metanoindex/>
<tbody> </tbody>
| definiert in Header <cstddef> |
||
|
|
(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.
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.
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.
Beispiel
#include <iostream> #include <cstddef> int main() { std::cout << alignof(std::max_align_t) << '\n'; }
Output:
Siehe auch
| alignof operator | queries alignment requirements of a type (seit C++11) [edit] |
(C++11) |
Ruft den Type der Alignment-Anforderungen Original: obtains the type's alignment requirements The text has been machine-translated via Google Translate. (Klassen-Template) [edit] |
(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. (Klassen-Template) [edit] |