diff options
Diffstat (limited to 'absl/container/flat_hash_set.h')
-rw-r--r-- | absl/container/flat_hash_set.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/absl/container/flat_hash_set.h b/absl/container/flat_hash_set.h index 930107ea212d..94be6e3d13f1 100644 --- a/absl/container/flat_hash_set.h +++ b/absl/container/flat_hash_set.h @@ -439,6 +439,14 @@ class flat_hash_set using Base::key_eq; }; +// erase_if(flat_hash_set<>, Pred) +// +// Erases all elements that satisfy the predicate `pred` from the container `c`. +template <typename T, typename H, typename E, typename A, typename Predicate> +void erase_if(flat_hash_set<T, H, E, A>& c, Predicate pred) { + container_internal::EraseIf(pred, &c); +} + namespace container_internal { template <class T> |