std::max_align_t
De 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. |
| Defined in header <cstddef>
|
||
| typedef /*implementation-defined*/ max_align_t; |
(depuis C++11) | |
std::max_align_t est un type POD dont l'alignement exigence est au moins aussi strictes (plus grande) que celle de chaque type scalaire .
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.
[modifier] Notes
Pointeurs retournés par les fonctions de répartition tels que std::malloc sont correctement alignée pour n'importe quel objet, ce qui signifie qu'ils sont alignés au moins aussi strictes que std::max_align_t .
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 est habituellement synonyme de plus grand type scalaire, qui est long double sur la plupart des plates-formes, et son exigence d'alignement est soit 8 ou 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.
[modifier] Exemple
#include <iostream> #include <cstddef> int main() { std::cout << alignof(std::max_align_t) << '\n'; }
Résultat :
16
[modifier] Voir aussi
| alignof operator | queries alignment requirements of a type (depuis C++11) |
| (C++11) |
obtient les exigences d'alignement du type (classe générique) |
| (C++11) |
vérifie si un type est de type scalaire 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. (classe générique) |

