std::list
De 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 en la cabecera <list>
|
||
template< class T, |
||
Lista es un contenedor que soporta la rápida inserción y retirada de elementos de cualquier parte del recipiente. acceso aleatorio rápido no es compatible. Está implementado como doble-linked lista. Comparado con std::forward_list este recipiente proporciona la capacidad de iteración bidireccional mientras que es menos eficiente en espacio .
Original:
List is a container which supports fast insertion and removal of elements from anywhere from the container. Fast random access is not supported. It is implemented as double-linked list. Compared to std::forward_list this container provides bidirectional iteration capability while being less space efficient.
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::list
cumple los requisitos de Container
, AllocatorAwareContainer
, SequenceContainer
y ReversibleContainer
.Original:
std::list
meets the requirements of Container
, AllocatorAwareContainer
, SequenceContainer
and ReversibleContainer
.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] Tipos de miembros
Miembro de tipo
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
value_type
|
T
|
allocator_type
|
Allocator
|
size_type
|
Tipo entero sin signo (por lo general size_t)
Original: Unsigned integral type (usually size_t) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
difference_type
|
Signed integer type (usually ptrdiff_t) |
reference
|
Allocator::reference (hasta C++11)value_type& (desde C++11)
|
const_reference
|
Allocator::const_reference (hasta C++11)const value_type& (desde C++11)
|
pointer
|
Allocator::pointer (hasta C++11)std::allocator_traits<Allocator>::pointer (desde C++11) |
const_pointer
|
Allocator::const_pointer (hasta C++11) std::allocator_traits<Allocator>::const_pointer (desde C++11) |
iterator
|
BidirectionalIterator
|
const_iterator
|
Iterador bidireccional constante
Original: Constant bidirectional iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
reverse_iterator
|
std::reverse_iterator<iterator> |
const_reverse_iterator
|
std::reverse_iterator<const_iterator> |
[editar] Las funciones miembro
construye el list Original: constructs the list The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
destructs the list (función miembro público) | |
asigna valores para el contenedor Original: assigns values to the container The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
asigna valores para el contenedor Original: assigns values to the container The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
devuelve el asignador asociado Original: returns the associated allocator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
Original: Element access The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
acceso al primer elemento Original: access the first element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
access the last element (función miembro público) | |
Original: Iterators The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
devuelve un iterador al principio Original: returns an iterator to the beginning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
devuelve un iterador hasta el final Original: returns an iterator to the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
devuelve un iterador inverso al principio Original: returns a reverse iterator to the beginning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
devuelve un iterador inverso hasta el final Original: returns a reverse iterator to the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
Original: Capacity The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
comprueba si el recipiente está vacío Original: checks whether the container is empty The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
devuelve el número de elementos Original: returns the number of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
devuelve el número máximo posible de elementos Original: returns the maximum possible number of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
Original: Modifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
borra el contenido Original: clears the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
Inserta elementos Original: inserts elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
(C++11) |
constructs element in-place (función miembro público) |
borra elementos Original: erases elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
agrega elementos al final Original: adds elements to the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
(C++11) |
construye elementos en lugar de al final Original: constructs elements in-place at the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) |
elimina el último elemento Original: removes the last element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
inserciones elementos al principio Original: inserts elements to the beginning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
(C++11) |
construye elementos en lugar de al principio Original: constructs elements in-place at the beginning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) |
elimina el primer elemento Original: removes the first element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
changes the number of elements stored (función miembro público) | |
intercambia los contenidos Original: swaps the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
Original: Operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
fusiona dos listas ordenadas Original: merges two sorted lists The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
mueve elementos de otro list Original: moves elements from another list The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
elimina elementos que cumplan criterios específicos Original: removes elements satisfying specific criteria The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
invierte el orden de los elementos Original: reverses the order of the elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
elimina los elementos duplicados consecutivos Original: removes consecutive duplicate elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
ordena los elementos Original: sorts the elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) |
[editar] Terceros funciones
compara lexicográficamente los valores del list (plantilla de función) | |
el algoritmo se especializa std::swap Original: specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (plantilla de función) |