Commit 1a03fb9d by Evan Brown Committed by Copybara-Service

Update comments to make it explicit that moving a flat_hash_{set,map} can cause…

Update comments to make it explicit that moving a flat_hash_{set,map} can cause pointers to elements to be invalidated.

PiperOrigin-RevId: 578920671
Change-Id: Ica40db48d5565b606e5e5f501c1305612b193d4d
parent 7135ec61
...@@ -64,7 +64,7 @@ struct FlatHashMapPolicy; ...@@ -64,7 +64,7 @@ struct FlatHashMapPolicy;
// `insert()`, provided that the map is provided a compatible heterogeneous // `insert()`, provided that the map is provided a compatible heterogeneous
// hashing function and equality operator. // hashing function and equality operator.
// * Invalidates any references and pointers to elements within the table after // * Invalidates any references and pointers to elements within the table after
// `rehash()`. // `rehash()` and when the table is moved.
// * Contains a `capacity()` member function indicating the number of element // * Contains a `capacity()` member function indicating the number of element
// slots (open, deleted, and empty) within the hash map. // slots (open, deleted, and empty) within the hash map.
// * Returns `void` from the `erase(iterator)` overload. // * Returns `void` from the `erase(iterator)` overload.
......
...@@ -60,7 +60,7 @@ struct FlatHashSetPolicy; ...@@ -60,7 +60,7 @@ struct FlatHashSetPolicy;
// that the set is provided a compatible heterogeneous hashing function and // that the set is provided a compatible heterogeneous hashing function and
// equality operator. // equality operator.
// * Invalidates any references and pointers to elements within the table after // * Invalidates any references and pointers to elements within the table after
// `rehash()`. // `rehash()` and when the table is moved.
// * Contains a `capacity()` member function indicating the number of element // * Contains a `capacity()` member function indicating the number of element
// slots (open, deleted, and empty) within the hash set. // slots (open, deleted, and empty) within the hash set.
// * Returns `void` from the `erase(iterator)` overload. // * Returns `void` from the `erase(iterator)` overload.
......
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