Commit e517aaf4 by Abseil Team Committed by Copybara-Service

Undo documentation change on erase.

PiperOrigin-RevId: 460555564
Change-Id: Icaf08bd252be12717f922e72a70a201bc1957154
parent 52e905e7
...@@ -228,11 +228,9 @@ class flat_hash_map : public absl::container_internal::raw_hash_map< ...@@ -228,11 +228,9 @@ class flat_hash_map : public absl::container_internal::raw_hash_map<
// NOTE: returning `void` in this case is different than that of STL // NOTE: returning `void` in this case is different than that of STL
// containers in general and `std::unordered_map` in particular (which // containers in general and `std::unordered_map` in particular (which
// return an iterator to the element following the erased element). If that // return an iterator to the element following the erased element). If that
// iterator is needed, copy the iterator before erasing: // iterator is needed, simply post increment the iterator:
// //
// // `erase()` will invalidate `it`, so advance `it` first. // map.erase(it++);
// auto copy_it = it++;
// m.erase(copy_it);
// //
// iterator erase(const_iterator first, const_iterator last): // iterator erase(const_iterator first, const_iterator last):
// //
......
...@@ -220,11 +220,9 @@ class flat_hash_set ...@@ -220,11 +220,9 @@ class flat_hash_set
// NOTE: returning `void` in this case is different than that of STL // NOTE: returning `void` in this case is different than that of STL
// containers in general and `std::unordered_set` in particular (which // containers in general and `std::unordered_set` in particular (which
// return an iterator to the element following the erased element). If that // return an iterator to the element following the erased element). If that
// iterator is needed, copy the iterator before erasing: // iterator is needed, simply post increment the iterator:
// //
// // `erase()` will invalidate `it`, so advance `it` first. // set.erase(it++);
// auto copy_it = it++;
// set.erase(copy_it);
// //
// iterator erase(const_iterator first, const_iterator last): // iterator erase(const_iterator first, const_iterator last):
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment