◐ Shell
clean mode source ↗

std::forward_list – cppreference.com

Aus cppreference.com

<tbody> </tbody>

definiert in Header

<forward_list>

template< class T, class Allocator = std::allocator<T> > class forward_list;

(seit C++11)

Forward List ist ein Container, der schnelles Einfügen und Entfernen von Elementen an jeder Position im Container unterstützt. Schneller Direktzugriff auf einzelne Elemente wird hingegen nicht unterstützt. Der Container ist als einfach verkettete Liste implementiert und weist, verglichen mit der Umsetzung in C, keinen wesentlichen Overhead auf. Im Vergleich zu std::list ist dieser Container eine speichereffiziente Lösung, wenn die bidirektionale Iteration nicht benötigt wird.

std::forward_list erfüllt die Anforderungen an Container (mit Ausnahme der size()-Elementfunktion), AllocatorAwareContainer und SequenceContainer .

Member-Typen

Mitglied Typ Definition
value_type T [edit]
allocator_type Allocator [edit]
size_type vorzeichenloser ganzzahliger Typ (in der Regel size_t)[edit]
difference_type vorzeichenbehafteter Typ (usually ptrdiff_t) [edit]
reference value_type& [edit]
const_reference const value_type& [edit]
pointer std::allocator_traits<Allocator>::pointer [edit]
const_pointer std::allocator_traits<Allocator>::const_pointer [edit]
iterator ForwardIterator [edit]
const_iterator

Constant Forward-Iterator

Original:

Constant forward iterator

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[edit]

Member-Funktionen

konstruiert die forward_list
(öffentliche Elementfunktion) [edit]
zerstört die forward_list
(öffentliche Elementfunktion) [edit]

weist Werte auf den Behälter

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.


(öffentliche Elementfunktion) [edit]

weist Werte auf den Behälter

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.


(öffentliche Elementfunktion) [edit]
liefert den zugehörigen Allocator
(öffentliche Elementfunktion) [edit]

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.

Zugriff auf das erste Element

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.


(öffentliche Elementfunktion) [edit]

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.

liefert einen Iterator auf das Element vor Beginn

Original:

returns an iterator to the element before 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]

liefert einen Iterator an den Anfang

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.


(öffentliche Elementfunktion) [edit]

liefert einen Iterator bis zum Ende

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.


(öffentliche Elementfunktion) [edit]

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.

prüft, ob der Container leer ist

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.


(öffentliche Elementfunktion) [edit]

gibt die maximal mögliche Anzahl von Elementen

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.


(öffentliche Elementfunktion) [edit]

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.

löscht den Inhalt

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.


(öffentliche Elementfunktion) [edit]

Einsätze Elemente nach einem Element

Original:

inserts elements after an element

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]

baut Elemente in-place nach einem Element

Original:

constructs elements in-place after an element

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]

löscht ein Element nach einem Element

Original:

erases an element after an element

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]
Elemente am Listenanfang einfügen
(öffentliche Elementfunktion) [edit]

Konstruiert Elemente in-place am Anfang

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.


(öffentliche Elementfunktion) [edit]

entfernt das erste Element

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.


(öffentliche Elementfunktion) [edit]
ändert die Anzahl der gespeicherten Elemente
(öffentliche Elementfunktion) [edit]

tauscht die Inhalte

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.


(öffentliche Elementfunktion) [edit]

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.

vereinigt zwei sortierte Listen
(öffentliche Elementfunktion) [edit]

Elemente aus einem anderen bewegt forward_list

Original:

moves elements from another forward_list

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]
entfernt Elemente anhand bestimmter Kriterien
(öffentliche Elementfunktion) [edit]
kehrt die Reihenfolge der Elemente um
(öffentliche Elementfunktion) [edit]
entfernt aufeinanderfolgende doppelte Elemente
(öffentliche Elementfunktion) [edit]

sortiert die Elemente

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.


(öffentliche Elementfunktion) [edit]

Non-Member-Funktionen