summaryrefslogtreecommitdiff
path: root/absl/container/flat_hash_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/flat_hash_map.h')
-rw-r--r--absl/container/flat_hash_map.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/absl/container/flat_hash_map.h b/absl/container/flat_hash_map.h
index 74def0df..69fbf239 100644
--- a/absl/container/flat_hash_map.h
+++ b/absl/container/flat_hash_map.h
@@ -541,10 +541,12 @@ class flat_hash_map : public absl::container_internal::raw_hash_map<
// erase_if(flat_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(flat_hash_map<K, V, H, E, A>& c, Predicate pred) {
- container_internal::EraseIf(pred, &c);
+typename flat_hash_map<K, V, H, E, A>::size_type erase_if(
+ flat_hash_map<K, V, H, E, A>& c, Predicate pred) {
+ return container_internal::EraseIf(pred, &c);
}
namespace container_internal {