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

Name

Description

l

list from which to erase elements

predicate

unary predicate selecting elements to erase

Created with MrDocs