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

Synopsis

Declared in <absl/container/node_hash_map.h>

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

Return Value

The number of erased elements.

Parameters

Name

Description

c

The container to erase elements from.

pred

The predicate that selects which elements to erase.

Created with MrDocs