Conceptos C++: Container
De cppreference.com
A
Container es un objeto que se utiliza para almacenar otros objetos y el cuidado de la gestión de la memoria utilizada por los objetos que contiene .Original:
A
Container is an object used to store other objects and taking care of the management of the memory used by the objects it contains.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.
Requisitos
Ctipo de contenedoresOriginal:CContainer typeThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.Ttipo de elementoOriginal:TElement typeThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.a,bObjetosCtipoOriginal:a,bObjects of typeCThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipos
| name | type | notes |
|---|---|---|
value_type |
T | Destructible
|
reference |
lvalue of T | |
const_reference |
const lvalue of T | |
iterator |
iterator pointing to T | ForwardIteratorconvertible to const_iterator
|
const_iterator |
const iterator pointing to T | ForwardIterator
|
difference_type |
signed integer | must be the same as iterator_traits::difference_type for iterator and const_iterator
|
size_type |
unsigned integer | large enough to represent all positive values of difference_type
|
Métodos y operadores
Datos de las carreras de contenedores
Implementaciones no están obligados a ofrecer ninguna garantía para la reentrada modificaciones de secuencia - no es seguro
push_back y leer begin al mismo tiempo. Sin embargo, se requiere para evitar carreras de datos cuando el contenido del objeto contenido en elementos diferentes de la misma secuencia se modifican simultáneamente (excepto para vector<bool>). En otras palabras, para un vector<int> con tamaño mayor que 1, y x[1] = 5 *x.begin() = 10 no resultará en una carrera de datos .Original:
Implementations are not required to provide any reentrancy guarantee for sequence modifications - it is not safe to
push_back and read begin concurrently. However, it is required to avoid data races when the contents of the contained object in different elements of the same sequence are modified concurrently (except for vector<bool>). In other words, for a vector<int> with size greater than 1, x[1] = 5 and *x.begin() = 10 will not result in a data race.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.
Estas funciones también debe ser considerado
const: begin, end, rbegin, rend, front, back, data, find, lower_bound, upper_bound, equal_range, at, y, excepto en AssociativeContainer y UnorderedAssociativeContainer, operator[]. Llamar a cualquiera de estas funciones al mismo tiempo no resultará en una carrera de datos .Original:
These functions must also be considered
const: begin, end, rbegin, rend, front, back, data, find, lower_bound, upper_bound, equal_range, at, and, except in AssociativeContainer and UnorderedAssociativeContainer, operator[]. Calling any of these functions concurrently will not result in a data race.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.
Otros conceptos
- C
- T
