[#bsl-erase_if-076]
= xref:bsl.adoc[bsl]::erase&lowbar;if
:relfileprefix: ../
:mrdocs:

Erase all elements in `l` that satisfy the specified `predicate`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;list&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE,
    class ALLOCATOR,
    class PREDICATE&gt;
bsl::list&lt;VALUE, ALLOCATOR&gt;::size&lowbar;type
erase&lowbar;if(
    xref:bsl/list-054.adoc[list&lt;VALUE, ALLOCATOR&gt;]& l,
    PREDICATE predicate);
----

== Description

Return the number of elements erased&period;

== 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]#
