std::unordered_map::erase — cppreference.com
De cppreference.com
<metanoindex/>
<tbody> </tbody>
|
|
(1) | (depuis C++11) |
|
|
(2) | (depuis C++11) |
|
|
(3) | (depuis C++11) |
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.
References and iterators to the erased elements are invalidated. Other iterators and references are not invalidated.
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. |
| first, last | - | éventail d'éléments à supprimer Original: range of elements to remove The text has been machine-translated via Google Translate. |
| key | - | valeur clé des éléments à supprimer Original: key value of the elements to remove The text has been machine-translated via Google Translate. |
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. (fonction membre publique) [edit] | |