std::list::remove, std::list::remove_if
Aus 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. |
| void remove( const T& value ); |
||
| template< class UnaryPredicate > void remove_if( UnaryPredicate p ); |
||
Entfernt alle Elemente, die die spezifischen Kriterien. Die erste Version entfernt alle Elemente, die gleich
value sind, entfernt der zweiten Version, für die alle Elemente Prädikats p kehrt true . Original:
Removes all elements satisfying specific criteria. The first version removes all elements that are equal to
value, the second version removes all elements for which predicate p returns true. 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.
Inhaltsverzeichnis |
[Bearbeiten] Parameter
| value | - | Wert der Elemente zu entfernen
Original: value of the elements to remove The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| p | - | unary predicate which returns true wenn das Element entfernt werden sollte . Original: if the element should be removed The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. The signature of the predicate function should be equivalent to the following: bool pred(const Type &a); The signature does not need to have const &, but the function must not modify the objects passed to it. |
[Bearbeiten] Rückgabewert
(None)
Original:
(none)
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.
[Bearbeiten] Komplexität
linear in der Größe des Behälters
Original:
linear in the size of the container
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.
[Bearbeiten] Beispiel
Output:
2 3 10 -1
[Bearbeiten] Siehe auch
| Entfernt Elemente erfüllen bestimmte Kriterien 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. (Funktions-Template) | |

