bsl::erase_if

Erase all elements in l that satisfy the specified predicate.

Synopsis

Declared in <bslstl_list.h>

template<
    class VALUE,
    class ALLOCATOR,
    class PREDICATE>
bsl::list<VALUE, ALLOCATOR>::size_type
erase_if(
    list<VALUE, ALLOCATOR>& l,
    PREDICATE predicate);

Description

Return the number of elements erased.

Return Value

number of elements erased

Parameters

NameDescription
llist from which to erase elements
predicateunary predicate selecting elements to erase