Undo documentation change on erase.
PiperOrigin-RevId: 460555564
Change-Id: Icaf08bd252be12717f922e72a70a201bc1957154
diff --git a/absl/container/flat_hash_map.h b/absl/container/flat_hash_map.h
index 006e478..e6bdbd9 100644
--- a/absl/container/flat_hash_map.h
+++ b/absl/container/flat_hash_map.h
@@ -228,11 +228,9 @@
// NOTE: returning `void` in this case is different than that of STL
// containers in general and `std::unordered_map` in particular (which
// 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.
- // auto copy_it = it++;
- // m.erase(copy_it);
+ // map.erase(it++);
//
// iterator erase(const_iterator first, const_iterator last):
//
diff --git a/absl/container/flat_hash_set.h b/absl/container/flat_hash_set.h
index 7bb1fa9..4938c70 100644
--- a/absl/container/flat_hash_set.h
+++ b/absl/container/flat_hash_set.h
@@ -220,11 +220,9 @@
// NOTE: returning `void` in this case is different than that of STL
// containers in general and `std::unordered_set` in particular (which
// 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.
- // auto copy_it = it++;
- // set.erase(copy_it);
+ // set.erase(it++);
//
// iterator erase(const_iterator first, const_iterator last):
//