Namensräume
Varianten
Aktionen

std::list::insert

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

 
 
 
std::list
Member-Funktionen
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.
list::list
list::~list
list::operator=
list::assign
list::get_allocator
Elementzugriff zerstört
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.
list::front
list::back
Iteratoren
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
list::begin
list::cbegin

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

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

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

(C++11)
Kapazität
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
list::empty
list::size
list::max_size
Modifiers
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::clear
list::insert
list::emplace(C++11)
list::erase
list::push_front
list::emplace_front(C++11)
list::pop_front
list::push_back
list::emplace_back(C++11)
list::pop_back
list::resize
list::swap
Operations
Original:
Operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
list::merge
list::splice
list::remove
list::remove_if
list::reverse
list::unique
list::sort
 
iterator insert( iterator pos, const T& value );
iterator insert( const_iterator pos, const T& value );
(1) (bis C + +11)
(seit C++11)
iterator insert( const_iterator pos, T&& value );
(2) (seit C++11)
void insert( iterator pos, size_type count, const T& value );
iterator insert( const_iterator pos, size_type count, const T& value );
(3) (bis C + +11)
(seit 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) (bis C + +11)

(seit C++11)
iterator insert( const_iterator pos, std::initializer_list<T> ilist );
(5) (seit C++11)
Fügt Elemente spezifizierte Position in dem Behälter .
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)
Einsätze value bevor das Element, um auf die durch 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)
Einsätze count Kopien der value vor dem Element, auf das 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)
Einsätze Elemente aus Bereich [first, last) vor dem Element, auf das 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)
Einsätze Elemente aus Initialisierungsliste 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.

Inhaltsverzeichnis

[Bearbeiten] Parameter

pos -
Element vor dem der Inhalt eingefügt werden
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 -
Wert des Elements einfügen
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 -
das Spektrum der Elemente einzufügen, kann nicht Iteratoren in den Behälter für die Insert aufgerufen wird
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 -
Initialisierungsliste um die Werte aus einzufügen
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.

[Bearbeiten] Rückgabewert

1-2)
Iterator zeigt auf der eingelegten value
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)
Iterator, der auf dem ersten Element eingeführt ist, oder wenn 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)
Iterator, der auf dem ersten Element eingeführt ist, oder wenn 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)
Iterator, der auf dem ersten Element eingeführt ist, oder wenn pos ilist leer ist .
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.

[Bearbeiten] Komplexität

1-2) Constant.

3) Linear in count

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

5) Linear in ilist.size()

[Bearbeiten] Siehe auch

(C++11)
constructs element in-place
(öffentliche Elementfunktion) [edit]
Elemente am Listenanfang einfügen
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.

(öffentliche Elementfunktion) [edit]
fügt Elemente am Ende
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.

(öffentliche Elementfunktion) [edit]