Namespace
Varianti

std::deque::insert

Da cppreference.com.
< cpp‎ | container‎ | deque

 
 
 
std :: deque
Membri funzioni
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.
deque::deque
deque::~deque
deque::operator=
deque::assign
deque::get_allocator
Elemento accesso
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.
deque::front
deque::back
Iteratori
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::begin
deque::cbegin

(C++11)
deque::end
deque::cend

(C++11)
deque::rbegin
deque::crbegin

(C++11)
deque::rend
deque::crend

(C++11)
Capacità
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::empty
deque::size
deque::max_size
deque::shrink_to_fit
Modificatori
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::clear
deque::insert
deque::emplace
deque::erase
deque::push_front
deque::emplace_front
deque::pop_front
deque::push_back
deque::emplace_back
deque::pop_back
deque::resize
deque::swap
 
iterator insert( iterator pos, const T& value );
iterator insert( const_iterator pos, const T& value );
(1) (C fino + 11)
(dal C++11)
iterator insert( const_iterator pos, T&& value );
(2) (dal C++11)
void insert( iterator pos, size_type count, const T& value );
iterator insert( const_iterator pos, size_type count, const T& value );
(3) (C fino + 11)
(dal 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) (C fino + 11)

(dal C++11)
iterator insert( const_iterator pos, std::initializer_list<T> ilist );
(5) (dal C++11)
Inserisce elementi alla posizione specificata nel contenitore.
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)
inserisce value prima che l'elemento puntato da 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)
inserti count copie del value prima l'elemento puntato da 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)
inserisce elementi di [first, last) campo prima che l'elemento puntato da 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)
inserisce elementi di lista di inizializzazione 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.

All iterators are invalidated. References are invalidated too, unless pos == begin() or pos == end(), in which case they are not invalidated.

Indice

[modifica] Parametri

pos -
elemento prima che il contenuto verrà inserito
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 di valore da inserire
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 gamma di elementi da inserire, non può essere iteratori in contenitore con cui è chiamato inserto
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 -
inizializzatore lista per inserire i valori da
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.
Type requirements
-
InputIt must meet the requirements of InputIterator.

[modifica] Valore di ritorno

1-2)
iteratore che punta al value inserito
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)
iteratore che punta al primo elemento inserito, o se 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)
iteratore che punta al primo elemento inserito, o se 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)
iteratore che punta al primo elemento inserito, o se pos ilist è vuoto.
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.

[modifica] Complessità

1-2) Constant plus linear in the lesser of the distances between pos and either of the ends of the container.

3) Linear in count plus linear in the lesser of the distances between pos and either of the ends of the container.

4) Linear in std::distance(first, last) plus linear in the lesser of the distances between pos and either of the ends of the container.

5) Linear in ilist.size() plus linear in the lesser of the distances between pos and either of the ends of the container.

[modifica] Vedi anche

(C++11)
constructs element in-place
(membro pubblico funzione) [edit]
inserisce elementi all'inizio
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.

(membro pubblico funzione) [edit]
aggiunge elementi alla fine
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.

(membro pubblico funzione) [edit]