absl::erase_if

Erases all elements that satisfy the predicate pred from the container c.

Synopsis

Declared in <absl/container/flat_hash_map.h>

template<
    typename K,
    typename V,
    typename H,
    typename E,
    typename A,
    typename Predicate>
flat_hash_map<K, V, H, E, A>::size_type
erase_if(
    flat_hash_map<K, V, H, E, A>& c,
    Predicate pred);

Return Value

The number of erased elements.

Parameters

NameDescription
cThe container to erase elements from.
predThe predicate that selects which elements to erase.