diff options
Diffstat (limited to 'absl/container/node_hash_set.h')
-rw-r--r-- | absl/container/node_hash_set.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/absl/container/node_hash_set.h b/absl/container/node_hash_set.h index f2cc70c3..421ff460 100644 --- a/absl/container/node_hash_set.h +++ b/absl/container/node_hash_set.h @@ -218,7 +218,11 @@ class node_hash_set // iterator erase(const_iterator first, const_iterator last): // // Erases the elements in the open interval [`first`, `last`), returning an - // iterator pointing to `last`. + // iterator pointing to `last`. The special case of calling + // `erase(begin(), end())` resets the reserved growth such that if + // `reserve(N)` has previously been called and there has been no intervening + // call to `clear()`, then after calling `erase(begin(), end())`, it is safe + // to assume that inserting N elements will not cause a rehash. // // size_type erase(const key_type& key): // @@ -334,7 +338,7 @@ class node_hash_set // for the past-the-end iterator, which is invalidated. // // `swap()` requires that the node hash set's hashing and key equivalence - // functions be Swappable, and are exchaged using unqualified calls to + // functions be Swappable, and are exchanged using unqualified calls to // non-member `swap()`. If the set's allocator has // `std::allocator_traits<allocator_type>::propagate_on_container_swap::value` // set to `true`, the allocators are also exchanged using an unqualified call |