about summary refs log tree commit diff
path: root/absl/container/node_hash_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/node_hash_map.h')
-rw-r--r--absl/container/node_hash_map.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/absl/container/node_hash_map.h b/absl/container/node_hash_map.h
index e8065a98a987..fccea1841c08 100644
--- a/absl/container/node_hash_map.h
+++ b/absl/container/node_hash_map.h
@@ -522,6 +522,15 @@ class node_hash_map
   void resize(typename Base::size_type hint) { this->rehash(hint); }
 };
 
+// erase_if(node_hash_map<>, Pred)
+//
+// Erases all elements that satisfy the predicate `pred` from the container `c`.
+template <typename K, typename V, typename H, typename E, typename A,
+          typename Predicate>
+void erase_if(node_hash_map<K, V, H, E, A>& c, Predicate pred) {
+  container_internal::EraseIf(pred, &c);
+}
+
 namespace container_internal {
 
 template <class Key, class Value>