Skip to content

Commit e12330f

Browse files
Abseil Teamcopybara-github
authored andcommitted
Automated rollback of commit cad6058.
PiperOrigin-RevId: 819254219 Change-Id: I6bd21984f71d9ef76ed71974f9422b05df363724
1 parent e5c6ccb commit e12330f

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

absl/container/flat_hash_map.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,9 @@ class ABSL_ATTRIBUTE_OWNER flat_hash_map
462462
//
463463
// Sets the number of slots in the `flat_hash_map` to the number needed to
464464
// accommodate at least `count` total elements without exceeding the current
465-
// maximum load factor, and may rehash the container if needed.
465+
// maximum load factor, and may rehash the container if needed. After this
466+
// returns, it is guaranteed that `count - size()` elements can be inserted
467+
// into the `flat_hash_map` without another rehash.
466468
using Base::reserve;
467469

468470
// flat_hash_map::at()

absl/container/flat_hash_set.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,9 @@ class ABSL_ATTRIBUTE_OWNER flat_hash_set
396396
//
397397
// Sets the number of slots in the `flat_hash_set` to the number needed to
398398
// accommodate at least `count` total elements without exceeding the current
399-
// maximum load factor, and may rehash the container if needed.
399+
// maximum load factor, and may rehash the container if needed. After this
400+
// returns, it is guaranteed that `count - size()` elements can be inserted
401+
// into the `flat_hash_set` without another rehash.
400402
using Base::reserve;
401403

402404
// flat_hash_set::contains()

absl/container/node_hash_map.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,9 @@ class ABSL_ATTRIBUTE_OWNER node_hash_map
455455
//
456456
// Sets the number of slots in the `node_hash_map` to the number needed to
457457
// accommodate at least `count` total elements without exceeding the current
458-
// maximum load factor, and may rehash the container if needed.
458+
// maximum load factor, and may rehash the container if needed. After this
459+
// returns, it is guaranteed that `count - size()` elements can be inserted
460+
// into the `node_hash_map` without another rehash.
459461
using Base::reserve;
460462

461463
// node_hash_map::at()

absl/container/node_hash_set.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,9 @@ class ABSL_ATTRIBUTE_OWNER node_hash_set
390390
//
391391
// Sets the number of slots in the `node_hash_set` to the number needed to
392392
// accommodate at least `count` total elements without exceeding the current
393-
// maximum load factor, and may rehash the container if needed.
393+
// maximum load factor, and may rehash the container if needed. After this
394+
// returns, it is guaranteed that `count - size()` elements can be inserted
395+
// into the `node_hash_set` without another rehash.
394396
using Base::reserve;
395397

396398
// node_hash_set::contains()

0 commit comments

Comments
 (0)