summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Evan Brown <ezb@google.com>2023-08-29 09:58:21 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-08-29 09:59:15 -0700
commite3fb72ffb83e5ae891cb6274002b287c9f75b8fa (patch)
tree32656e95f2f9fa8710813f8f085194a518f7b5f8
parentba7a9e2422cce2bc310c93dfb0b5997f69f7a291 (diff)
Make raw_hash_set::destroy_slots no longer public. It was never meant to be a public member of the API.
PiperOrigin-RevId: 561061460 Change-Id: Ib804d3d3cf427ebfc9e622db9915287eb8045e26
-rw-r--r--absl/container/internal/raw_hash_set.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h
index f4cf8367..4bbb85f4 100644
--- a/absl/container/internal/raw_hash_set.h
+++ b/absl/container/internal/raw_hash_set.h
@@ -1990,17 +1990,6 @@ class raw_hash_set {
common().set_reservation_size(0);
}
- inline void destroy_slots() {
- const size_t cap = capacity();
- const ctrl_t* ctrl = control();
- slot_type* slot = slot_array();
- for (size_t i = 0; i != cap; ++i) {
- if (IsFull(ctrl[i])) {
- PolicyTraits::destroy(&alloc_ref(), slot + i);
- }
- }
- }
-
// This overload kicks in when the argument is an rvalue of insertable and
// decomposable type other than init_type.
//
@@ -2538,6 +2527,17 @@ class raw_hash_set {
slot_type&& slot;
};
+ inline void destroy_slots() {
+ const size_t cap = capacity();
+ const ctrl_t* ctrl = control();
+ slot_type* slot = slot_array();
+ for (size_t i = 0; i != cap; ++i) {
+ if (IsFull(ctrl[i])) {
+ PolicyTraits::destroy(&alloc_ref(), slot + i);
+ }
+ }
+ }
+
// Erases, but does not destroy, the value pointed to by `it`.
//
// This merely updates the pertinent control byte. This can be used in