std::align - 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 <memory> |
||
|
|
(dal C++11) | |
Se è possibile montare bytes size di stoccaggio allineato alignment nel buffer puntato da ptr con space lunghezza, la funzione modifica ptr per puntare al primo indirizzo possibile di tale stoccaggio allineate e diminuisce space dal numero di byte utilizzato per l'allineamento. Se è impossibile (il buffer è troppo piccolo), non fa nulla.. align
Original:
If it is possible to fit size bytes of storage aligned by alignment into the buffer pointed to by ptr with length space, the function modifies ptr to point to the first possible address of such aligned storage and decreases space by the number of bytes used for alignment. If it is impossible (the buffer is too small), align does nothing.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Parametri
| alignment | - | l'allineamento desiderato Original: the desired alignment The text has been machine-translated via Google Translate. |
| size | - | la dimensione della memoria da allineare Original: the size of the storage to be aligned The text has been machine-translated via Google Translate. |
| ptr | - | puntatore alla memorizzazione contiguo di almeno byte Original: pointer to contiguous storage of at least The text has been machine-translated via Google Translate. |
| space | - | la dimensione del buffer in cui operare Original: the size of the buffer in which to operate The text has been machine-translated via Google Translate. |
Valore di ritorno
Il valore corretto della ptr, o il valore puntatore nullo se lo spazio disponibile è troppo piccolo.
Original:
The adjusted value of ptr, or null pointer value if the space provided is too small.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Esempio
Vedi anche
| alignof operator | queries alignment requirements of a type (dal C++11) [modifica] |
| alignas specificatore | specifica che il deposito per la variabile deve essere allineato (C++11) quantità specifica Original: specifies that the storage for the variable should be aligned by specific amount (C++11) The text has been machine-translated via Google Translate. |
(C++11) |
definisce il tipo idoneo all'uso come memoria non inizializzato per tipi di dimensione data Original: defines the type suitable for use as uninitialized storage for types of given size The text has been machine-translated via Google Translate. (classe template) [modifica] |