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
diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h
index f4cf836..4bbb85f 100644
--- a/absl/container/internal/raw_hash_set.h
+++ b/absl/container/internal/raw_hash_set.h
@@ -1990,17 +1990,6 @@
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 @@
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