[#bsl-erase-03]
= xref:bsl.adoc[bsl]::erase
:relfileprefix: ../
:mrdocs:

`erase` overloads

== Synopses

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

Erase all the elements in the specified deque `deq` that compare equal to the specified `value`&period; Return the number of elements erased&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE&lowbar;TYPE,
    class ALLOCATOR,
    class BDE&lowbar;OTHER&lowbar;TYPE&gt;
deque&lt;VALUE&lowbar;TYPE, ALLOCATOR&gt;::size&lowbar;type
xref:bsl/erase-082.adoc[erase](
    xref:bsl/deque-0c.adoc[deque&lt;VALUE&lowbar;TYPE, ALLOCATOR&gt;]& deq,
    BDE&lowbar;OTHER&lowbar;TYPE const& value);
----

[.small]#xref:bsl/erase-082.adoc[_» more&period;&period;&period;_]#

Erase all the elements in the specified list `l` that compare equal to the specified `value`&period; Return the number of elements erased&period;


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

[.small]#xref:bsl/erase-086.adoc[_» more&period;&period;&period;_]#

Erase all the elements in the specified vector `vec` that compare equal to the specified `value`&period; Return the number of elements erased&period;


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

[.small]#xref:bsl/erase-0c.adoc[_» more&period;&period;&period;_]#

Erase (in&hyphen;place) all the elements from the specified `str` that compare equal to the specified `c`, and return the number of erased elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class CHAR&lowbar;TYPE,
    class CHAR&lowbar;TRAITS,
    class ALLOCATOR,
    class OTHER&lowbar;CHAR&lowbar;TYPE&gt;
bsl::basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, ALLOCATOR&gt;::size&lowbar;type
xref:bsl/erase-07.adoc[erase](
    xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, ALLOCATOR&gt;]& str,
    OTHER&lowbar;CHAR&lowbar;TYPE const& c);
----

[.small]#xref:bsl/erase-07.adoc[_» more&period;&period;&period;_]#


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