summaryrefslogtreecommitdiff
path: root/absl/container/node_hash_set.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/node_hash_set.h')
-rw-r--r--absl/container/node_hash_set.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/absl/container/node_hash_set.h b/absl/container/node_hash_set.h
index 4247288d..3bc5fe6b 100644
--- a/absl/container/node_hash_set.h
+++ b/absl/container/node_hash_set.h
@@ -433,9 +433,11 @@ class node_hash_set
// erase_if(node_hash_set<>, Pred)
//
// Erases all elements that satisfy the predicate `pred` from the container `c`.
+// Returns the number of erased elements.
template <typename T, typename H, typename E, typename A, typename Predicate>
-void erase_if(node_hash_set<T, H, E, A>& c, Predicate pred) {
- container_internal::EraseIf(pred, &c);
+typename node_hash_set<T, H, E, A>::size_type erase_if(
+ node_hash_set<T, H, E, A>& c, Predicate pred) {
+ return container_internal::EraseIf(pred, &c);
}
namespace container_internal {