std::allocator::construct - cppreference.com
De cppreference.com
<metanoindex/>
<tbody> </tbody>
| Definido no cabeçalho <memory> |
||
|
|
(até C++11) | |
|
|
(desde C++11) | |
Constrói um objeto do tipo em T alocado armazenamento não inicializado apontado por p, usando a colocação de novos
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)
Chama 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)
Chama ::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.
Parâmetros
| p | - | ponteiro para armazenamento alocado não inicializado Original: pointer to allocated uninitialized storage The text has been machine-translated via Google Translate. |
| val | - | o valor a ser usado como o argumento construtor de cópia Original: the value to use as the copy constructor argument The text has been machine-translated via Google Translate. |
| args... | - | os argumentos de construtor de usar Original: the constructor arguments to use The text has been machine-translated via Google Translate. |
Valor de retorno
(Nenhum)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Veja também
constrói um objeto no armazenamento alocado Original: constructs an object in the allocated storage The text has been machine-translated via Google Translate. (modelo de função) [edit] | |
funções de alocação Original: allocation functions The text has been machine-translated via Google Translate. (função) [edit] | |