Erase every element of m that satisfies predicate.
Declared in <bslstl_unorderedmap.h>
template<
class KEY,
class VALUE,
class HASH,
class EQUAL,
class ALLOCATOR,
class PREDICATE>
bsl::unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
erase_if(
unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& m,
PREDICATE predicate);
Erase all the elements in the specified unordered_map m that satisfy the specified predicate predicate. Return the number of elements erased.
number of elements erased
| Name | Description |
|---|---|
| m | unordered map from which matching elements are erased |
| predicate | unary predicate selecting elements to erase |