util/IntrusiveHashSet: add method remove_and_dispose_if(key)

This commit is contained in:
Max Kellermann 2022-12-01 16:18:40 +01:00 committed by Max Kellermann
parent 74976d3199
commit 49e122a81d
1 changed files with 9 additions and 0 deletions

View File

@ -208,6 +208,15 @@ public:
bucket.remove_and_dispose_if(pred, disposer);
}
constexpr void remove_and_dispose_if(const auto &key,
Predicate<const_reference> auto pred,
Disposer<value_type> auto disposer) noexcept {
static_assert(!constant_time_size, "Not yet implemented");
auto &bucket = GetBucket(key);
bucket.remove_and_dispose_if(pred, disposer);
}
[[nodiscard]]
static constexpr bucket_iterator iterator_to(reference item) noexcept {
return Bucket::iterator_to(item);