summaryrefslogtreecommitdiff
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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/absl/container/node_hash_map.h b/absl/container/node_hash_map.h
index 302dafa2..0d4ebeda 100644
--- a/absl/container/node_hash_map.h
+++ b/absl/container/node_hash_map.h
@@ -525,10 +525,12 @@ class node_hash_map
// erase_if(node_hash_map<>, Pred)
//
// Erases all elements that satisfy the predicate `pred` from the container `c`.
+// Returns the number of erased elements.
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);
+typename node_hash_map<K, V, H, E, A>::size_type erase_if(
+ node_hash_map<K, V, H, E, A>& c, Predicate pred) {
+ return container_internal::EraseIf(pred, &c);
}
namespace container_internal {