Commit e3fb72ff by Evan Brown Committed by Copybara-Service

Make raw_hash_set::destroy_slots no longer public. It was never meant to be a…

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
parent ba7a9e24
...@@ -1990,17 +1990,6 @@ class raw_hash_set { ...@@ -1990,17 +1990,6 @@ class raw_hash_set {
common().set_reservation_size(0); 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 // This overload kicks in when the argument is an rvalue of insertable and
// decomposable type other than init_type. // decomposable type other than init_type.
// //
...@@ -2538,6 +2527,17 @@ class raw_hash_set { ...@@ -2538,6 +2527,17 @@ class raw_hash_set {
slot_type&& slot; 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`. // Erases, but does not destroy, the value pointed to by `it`.
// //
// This merely updates the pertinent control byte. This can be used in // This merely updates the pertinent control byte. This can be used in
......
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