std::allocator::construct
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. |
Elemento definito nell'header <memory>
|
||
void construct( pointer p, const_reference val ); |
(fino al c++11) | |
template< class U, class... Args > void construct( U* p, Args&&... args ); |
(dal C++11) | |
Costruisce un oggetto di tipo
1) T
in memoria non inizializzata assegnato puntato da p
, utilizzando il posizionamento-nuovoOriginal:
Constructs an object of type
T
in allocated uninitialized storage pointed to by p
, using placement-newThe 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.
Chiamate new((void *)p) T(val)
2) Original:
Calls new((void *)p) T(val)
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.
Chiamate ::new((void *)p) U(std::forward<Args>(args)...)
Original:
Calls ::new((void *)p) U(std::forward<Args>(args)...)
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
p | - | puntatore alla memoria allocata non inizializzata
Original: pointer to allocated uninitialized storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
val | - | il valore da utilizzare come argomento del costruttore di copia
Original: the value to use as the copy constructor argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
args... | - | gli argomenti del costruttore per l'uso
Original: the constructor arguments to use 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
(Nessuno)
Original:
(none)
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
[statico] |
costruisce un oggetto nella memoria allocata Original: constructs an object in the allocated storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione di modello) |
allocazione funzioni Original: allocation functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione) |