std::allocator::construct
Da cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Definido no cabeçalho <memory>
|
||
void construct( pointer p, const_reference val ); |
(até C++11) | |
template< class U, class... Args > void construct( U* p, Args&&... args ); |
(desde C++11) | |
Constrói um objeto do tipo em
1) T
alocado armazenamento não inicializado apontado por p
, usando a colocação de novosOriginal:
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.
Chama 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.
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.
You can help to correct and verify the translation. Click here for instructions.
[editar] 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. You can help to correct and verify the translation. Click here for instructions. |
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. You can help to correct and verify the translation. Click here for instructions. |
args... | - | os argumentos de construtor de usar
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. |
[editar] 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.
You can help to correct and verify the translation. Click here for instructions.
[editar] Veja também
[estática] |
constrói um objeto no armazenamento alocado 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. (modelo de função) |
funções de alocação 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. (função) |