Espacios de nombres
Variantes
Acciones

std::list::insert

De cppreference.com
< cpp‎ | container‎ | list

 
 
 
std::list
Las funciones miembro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Elemento acceso
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.
Los iteradores
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Capacidad
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Modificadores
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
list::insert
Operaciones
Original:
Operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
iterator insert( iterator pos, const T& value );
iterator insert( const_iterator pos, const T& value );
(1) (hasta C++11)
(desde C++11)
iterator insert( const_iterator pos, T&& value );
(2) (desde C++11)
void insert( iterator pos, size_type count, const T& value );
iterator insert( const_iterator pos, size_type count, const T& value );
(3) (hasta C++11)
(desde C++11)
template< class InputIt >

void insert( iterator pos, InputIt first, InputIt last);
template< class InputIt >

iterator insert( const_iterator pos, InputIt first, InputIt last );
(4) (hasta C++11)

(desde C++11)
iterator insert( const_iterator pos, std::initializer_list<T> ilist );
(5) (desde C++11)
Inserta elementos a la posición especificada en el envase .
Original:
Inserts elements to specified position in the container.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1-2)
insertos value antes del elemento apuntado por pos
Original:
inserts value before the element pointed to by pos
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
insertos count copias del value antes del elemento apuntado por pos
Original:
inserts count copies of the value before the element pointed to by pos
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
elementos insertos de [first, last) rango antes del elemento apuntado por pos
Original:
inserts elements from range [first, last) before the element pointed to by pos
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
elementos insertos de la lista de inicializador ilist .
Original:
inserts elements from initializer list ilist.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

No iterators or references are invalidated.

Contenido

[editar] Parámetros

pos -
elemento antes de que el contenido se inserta
Original:
element before which the content will be inserted
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
value -
elemento de valor que se inserta
Original:
element value to insert
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
first, last -
la gama de elementos a insertar, no puede ser iteradores en el recipiente para que se insertan se llama
Original:
the range of elements to insert, can't be iterators into container for which insert is called
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ilist -
lista de inicializadores para insertar los valores de
Original:
initializer list to insert the values from
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Requerimientos de tipo
-
InputIt debe reunir los requerimientos de InputIterator.

[editar] Valor de retorno

1-2)
iterador que señala a la value insertado
Original:
iterator pointing to the inserted value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
iterador que señala al primer elemento insertado, o si pos count==0 .
Original:
iterator pointing to the first element inserted, or pos if count==0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
iterador que señala al primer elemento insertado, o si pos first==last .
Original:
iterator pointing to the first element inserted, or pos if first==last.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
iterador que señala al primer elemento insertado, o si pos ilist está vacío .
Original:
iterator pointing to the first element inserted, or pos if ilist is empty.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Complejidad

1-2) Constant.

3) Linear in count

4) Linear in std::distance(first, last)

5) Linear in ilist.size()

[editar] Ver también

(C++11)
constructs element in-place
(función miembro público) [editar]
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) [editar]
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) [editar]