[#bsl-erase_if-076] = xref:bsl.adoc[bsl]::erase_if :relfileprefix: ../ :mrdocs: Erase all elements in `l` that satisfy the specified `predicate`. == Synopsis Declared in `<bslstl_list.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class VALUE, class ALLOCATOR, class PREDICATE> bsl::list<VALUE, ALLOCATOR>::size_type erase_if( xref:bsl/list-054.adoc[list<VALUE, ALLOCATOR>]& l, PREDICATE predicate); ---- == Description Return the number of elements erased. == Return Value number of elements erased == Parameters [cols="1,4"] |=== | Name| Description | *l* | list from which to erase elements | *predicate* | unary predicate selecting elements to erase |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#