std::max_align_t - cppreference.com
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody>
| Elemento definito nell'header <cstddef> |
||
|
|
(dal C++11) | |
std::max_align_t è un tipo POD cui allineamento requisito è almeno altrettanto rigorose (grande) come di ogni tipo scalare.
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.
Note
Puntatori restituiti dalle funzioni di allocazione, quali std::malloc come sono opportunamente allineati per qualsiasi oggetto, il che significa che sono allineati almeno altrettanto rigorose di quelle 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.
std::max_align_t solito è sinonimo di tipo scalare più grande, che è long double sulla maggior parte delle piattaforme, e la richiesta, l'allineamento è 8 o 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.
Esempio
#include <iostream> #include <cstddef> int main() { std::cout << alignof(std::max_align_t) << '\n'; }
Output:
Vedi anche
| alignof operator | queries alignment requirements of a type (dal C++11) [modifica] |
(C++11) |
ottiene requisiti di allineamento del tipo Original: obtains the type's alignment requirements The text has been machine-translated via Google Translate. (classe template) [modifica] |
(C++11) |
Verifica se un tipo è di tipo scalare Original: checks if a type is scalar type The text has been machine-translated via Google Translate. (classe template) [modifica] |