std::allocator_traits::allocate
Da cppreference.com.
< cpp | memory | allocator traits
![]() |
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. |
Elemento definito nell'header <memory>
|
||
static pointer allocate( Alloc& a, size_type n ); |
(1) | (dal C++11) |
static pointer allocate( Alloc& a, size_type n, const_void_pointer hint ); |
(2) | (dal C++11) |
Utilizza il
2) a
allocatore di allocare byte n*sizeof(Alloc::value_type) di archiviazione non inizializzato, chiamando a.allocate(n)Original:
Uses the allocator
a
to allocate n*sizeof(Alloc::value_type) bytes of uninitialized storage, by calling a.allocate(n)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.
Utilizza il
a
allocatore di allocare byte n*sizeof(Alloc::value_type) di archiviazione non inizializzato con il hint
suggerimento memoria località. Chiamate a.allocate(n, hint) se possibile. Se non è possibile (ad esempio una non ha due argomenti funzione membro allocate ()), chiama a.allocate(n)Original:
Uses the allocator
a
to allocate n*sizeof(Alloc::value_type) bytes of uninitialized storage with the memory locality hint hint
. Calls a.allocate(n, hint) if possible. If not possible (e.g. a has no two-argument member function allocate()), calls a.allocate(n)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.
[modifica] Parametri
a | - | allocatore utilizzare
Original: allocator to use The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
n | - | il numero di oggetti da allocare memoria per
Original: the number of objects to allocate storage for The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
hint | - | puntatore a una posizione di memoria nelle vicinanze
Original: pointer to a nearby memory location The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifica] Valore di ritorno
Il puntatore restituito dalla chiamata a
a.allocate(n)
Original:
The pointer returned by the call to
a.allocate(n)
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.
[modifica] Vedi anche
alloca memoria non inizializzata Original: allocates uninitialized storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico) |