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

Erase all the elements in the specified vector `vec` that satisfy the specified predicate `predicate`&period; Return the number of elements erased&period;

== Synopsis

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

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


[.small]#Created with https://www.mrdocs.com[MrDocs]#
