bsl::erase_if

Erase every element of m that satisfies predicate.

Synopsis

Declared in <bslstl_map.h>

template<
    class KEY,
    class VALUE,
    class COMPARATOR,
    class ALLOCATOR,
    class PREDICATE>
bsl::map<KEY, VALUE, COMPARATOR, ALLOCATOR>::size_type
erase_if(
    map<KEY, VALUE, COMPARATOR, ALLOCATOR>& m,
    PREDICATE predicate);

Description

Erase all the elements in the specified map m that satisfy the specified predicate predicate. Return the number of elements erased.

Return Value

number of elements erased

Parameters

NameDescription
mmap from which matching elements are erased
predicateunary predicate selecting elements to erase