Espaces de noms
Variantes

std::{{{1}}}::erase

De cppreference.com

<metanoindex/>

<tbody> </tbody>
iterator erase( const_iterator position );
(1)
(Pas de conteneur - C + 11 fonctionnalité)
Original:
(no container - C++11 feature)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iterator erase( const_iterator first, const_iterator last );
(2)
(Pas de conteneur - C + 11 fonctionnalité)
Original:
(no container - C++11 feature)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
size_type erase( const key_type& key );
(3)
(Pas de conteneur - C + 11 fonctionnalité)
Original:
(no container - C++11 feature)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Supprime les éléments spécifiés à partir du conteneur .
Original:
Removes specified elements from 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)
Supprime l'élément à pos .
Original:
Removes the element at pos.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Supprime les éléments de la gamme [first; last) .
Original:
Removes the elements in the range [first; last).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Supprime tous les éléments de la key valeur de clé
Original:
Removes all elements with the key value key
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Information on iterator invalidation is copied from ici

Paramètres

pos -
itérateur sur l'élément à supprimer
Original:
iterator to the element to remove
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
first, last -
éventail d'éléments à supprimer
Original:
range of 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.
key -
valeur clé des éléments à supprimer
Original:
key 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.

Retourne la valeur

1-2)
Iterator après le dernier élément enlevé .
Original:
Iterator following the last removed element.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Nombre d'éléments enlevé .
Original:
Number of elements removed.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Complexité

1) Average case: constant, worst case: a.size()
2) Average case: std::distance(first, last), worst case: a.size()
3) Average case: a.count(key), worst case: a.size()

Voir aussi

efface le contenu
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.

(fonction membre publique de std::{{{1}}}) [edit]