Conceptos C++: CopyInsertable
De cppreference.com
![]() |
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
Especifica que una instancia del tipo de copia puede ser construido en el lugar, en el almacenamiento sin inicializar .
Original:
Specifies that an instance of the type can be copy-constructed in-place, in uninitialized storage.
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] Requisitos
El tipo es
T
CopyInsertable
en el contenedor X
si, dadaOriginal:
The type
T
is CopyInsertable
into the container X
if, givenThe 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.
A
|
el tipo asignador define como
X::allocator_type Original: the allocator type defined as X::allocator_type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
m
|
el valor-de
A clase obtenida a partir de X::get_allocator() Original: the lvalue of type A obtained from X::get_allocator() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
p
|
el puntero de
T* tipo preparado por el contenedor Original: the pointer of type T* prepared by the container The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
v
|
expresión de
T tipo, siempre como argumento para push_back (), etc Original: expression of type T , provided as the argument to push_back(), etc The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
la siguiente expresión es bien formado:
Original:
the following expression is well-formed:
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.
std::allocator_traits<A>::construct(m, p, v);
Tenga en cuenta que si es
A
std::allocator<T>, entonces esto va a llamar a la colocación de nueva construcción, como por ::new((void*)p) T(v)Original:
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.