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

`erase&lowbar;if` overloads

== Synopses

Declared in `&lt;absl&sol;container&sol;btree&lowbar;map&period;h&gt;`

Erases all elements that satisfy the predicate `pred` from the inlined vector `v`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename T,
    size&lowbar;t N,
    typename A,
    typename Predicate&gt;
constexpr
InlinedVector&lt;T, N, A&gt;::size&lowbar;type
xref:absl/erase_if-049.adoc[erase&lowbar;if](
    xref:absl/InlinedVector.adoc[InlinedVector&lt;T, N, A&gt;]& v,
    Predicate pred);
----

[.small]#xref:absl/erase_if-049.adoc[_» more&period;&period;&period;_]#

Erases all elements that satisfy the predicate `pred` from the container&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename K,
    typename C,
    typename A,
    typename Pred&gt;
btree&lowbar;multiset&lt;K, C, A&gt;::size&lowbar;type
xref:absl/erase_if-042.adoc[erase&lowbar;if](
    xref:absl/btree_multiset.adoc[btree&lowbar;multiset&lt;K, C, A&gt;]& set,
    Pred pred);
----

[.small]#xref:absl/erase_if-042.adoc[_» more&period;&period;&period;_]#

Erases all elements that satisfy the predicate `pred` from the container&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename K,
    typename C,
    typename A,
    typename Pred&gt;
btree&lowbar;set&lt;K, C, A&gt;::size&lowbar;type
xref:absl/erase_if-014.adoc[erase&lowbar;if](
    xref:absl/btree_set.adoc[btree&lowbar;set&lt;K, C, A&gt;]& set,
    Pred pred);
----

[.small]#xref:absl/erase_if-014.adoc[_» more&period;&period;&period;_]#

Erases all elements that satisfy the predicate `pred` from the container&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename K,
    typename V,
    typename C,
    typename A,
    typename Pred&gt;
btree&lowbar;map&lt;K, V, C, A&gt;::size&lowbar;type
xref:absl/erase_if-089.adoc[erase&lowbar;if](
    xref:absl/btree_map.adoc[btree&lowbar;map&lt;K, V, C, A&gt;]& map,
    Pred pred);
----

[.small]#xref:absl/erase_if-089.adoc[_» more&period;&period;&period;_]#

Erases all elements that satisfy the predicate `pred` from the container&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename K,
    typename V,
    typename C,
    typename A,
    typename Pred&gt;
btree&lowbar;multimap&lt;K, V, C, A&gt;::size&lowbar;type
xref:absl/erase_if-0ff.adoc[erase&lowbar;if](
    xref:absl/btree_multimap.adoc[btree&lowbar;multimap&lt;K, V, C, A&gt;]& map,
    Pred pred);
----

[.small]#xref:absl/erase_if-0ff.adoc[_» more&period;&period;&period;_]#

Erases all elements that satisfy the predicate `pred` from the container `c`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename T,
    typename H,
    typename E,
    typename A,
    typename Predicate&gt;
flat&lowbar;hash&lowbar;set&lt;T, H, E, A&gt;::size&lowbar;type
xref:absl/erase_if-05.adoc[erase&lowbar;if](
    xref:absl/flat_hash_set.adoc[flat&lowbar;hash&lowbar;set&lt;T, H, E, A&gt;]& c,
    Predicate pred);
----

[.small]#xref:absl/erase_if-05.adoc[_» more&period;&period;&period;_]#

Erases all elements that satisfy the predicate `pred` from the container `c`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename T,
    typename H,
    typename E,
    typename A,
    typename Predicate&gt;
node&lowbar;hash&lowbar;set&lt;T, H, E, A&gt;::size&lowbar;type
xref:absl/erase_if-0f7.adoc[erase&lowbar;if](
    xref:absl/node_hash_set.adoc[node&lowbar;hash&lowbar;set&lt;T, H, E, A&gt;]& c,
    Predicate pred);
----

[.small]#xref:absl/erase_if-0f7.adoc[_» more&period;&period;&period;_]#

Erases all elements that satisfy the predicate `pred` from the container `c`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename K,
    typename V,
    typename H,
    typename E,
    typename A,
    typename Predicate&gt;
flat&lowbar;hash&lowbar;map&lt;K, V, H, E, A&gt;::size&lowbar;type
xref:absl/erase_if-08b.adoc[erase&lowbar;if](
    xref:absl/flat_hash_map.adoc[flat&lowbar;hash&lowbar;map&lt;K, V, H, E, A&gt;]& c,
    Predicate pred);
----

[.small]#xref:absl/erase_if-08b.adoc[_» more&period;&period;&period;_]#

Erases all elements that satisfy the predicate `pred` from the container `c`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename K,
    typename V,
    typename H,
    typename E,
    typename A,
    typename Predicate&gt;
node&lowbar;hash&lowbar;map&lt;K, V, H, E, A&gt;::size&lowbar;type
xref:absl/erase_if-013.adoc[erase&lowbar;if](
    xref:absl/node_hash_map.adoc[node&lowbar;hash&lowbar;map&lt;K, V, H, E, A&gt;]& c,
    Predicate pred);
----

[.small]#xref:absl/erase_if-013.adoc[_» more&period;&period;&period;_]#

== Return Value

The number of erased elements&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *v*
| The inlined vector to erase elements from&period;
| *pred*
| The predicate that selects elements to erase&period;
| *set*
| The container to erase elements from&period;
| *map*
| The container to erase elements from&period;
| *c*
| The container to erase elements from&period;
|===


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