diff options
author | Abseil Team <absl-team@google.com> | 2022-07-12 14:39:46 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-07-12 14:40:18 -0700 |
commit | e517aaf499f88383000d4ddf6b84417fbbb48791 (patch) | |
tree | b43296b38d920f0a1dca0d7889f43f4ec1f5d2e4 /absl/container/flat_hash_set.h | |
parent | 52e905e760765c88e1fae96a6649f80e51c28c55 (diff) | |
download | abseil-e517aaf499f88383000d4ddf6b84417fbbb48791.tar.gz abseil-e517aaf499f88383000d4ddf6b84417fbbb48791.tar.bz2 abseil-e517aaf499f88383000d4ddf6b84417fbbb48791.zip |
Undo documentation change on erase.
PiperOrigin-RevId: 460555564
Change-Id: Icaf08bd252be12717f922e72a70a201bc1957154
Diffstat (limited to 'absl/container/flat_hash_set.h')
-rw-r--r-- | absl/container/flat_hash_set.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/absl/container/flat_hash_set.h b/absl/container/flat_hash_set.h index 7bb1fa90..4938c703 100644 --- a/absl/container/flat_hash_set.h +++ b/absl/container/flat_hash_set.h @@ -220,11 +220,9 @@ class flat_hash_set // 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): // |