◐ Shell
clean mode source ↗

std::allocator::construct - 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.

Click here for the English version of this page

<metanoindex/>

<tbody> </tbody>

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 T in memoria non inizializzata assegnato puntato da p, utilizzando il posizionamento-nuovo

Original:

Constructs an object of type T in allocated uninitialized storage pointed to by p, using placement-new

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

1)

Chiamate new((void *)p) T(val)

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.

2)

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.

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.

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.

Vedi anche

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) [modifica]

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) [modifica]