[#BloombergLP-bdlc-FlatHashTable-erase-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/FlatHashTable.adoc[FlatHashTable]::erase
:relfileprefix: ../../../
:mrdocs:

`erase` overloads

== Synopses

Declared in `&lt;bdlc&lowbar;flathashtable&period;h&gt;`

Remove the entry at the specified `position`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashTable/iterator.adoc[FlatHashTable&lt;KEY, ENTRY, ENTRY&lowbar;UTIL, HASH, EQUAL&gt;::iterator]
xref:BloombergLP/bdlc/FlatHashTable/erase-0e.adoc[erase](xref:BloombergLP/bdlc/FlatHashTable/const_iterator.adoc[const&lowbar;iterator] position);
----

[.small]#xref:BloombergLP/bdlc/FlatHashTable/erase-0e.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload for a non&hyphen;const `iterator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashTable/iterator.adoc[FlatHashTable&lt;KEY, ENTRY, ENTRY&lowbar;UTIL, HASH, EQUAL&gt;::iterator]
xref:BloombergLP/bdlc/FlatHashTable/erase-08.adoc[erase](xref:BloombergLP/bdlc/FlatHashTable/iterator.adoc[iterator] position);
----

[.small]#xref:BloombergLP/bdlc/FlatHashTable/erase-08.adoc[_» more&period;&period;&period;_]#

Remove the entry with the specified `key`, if present&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::size&lowbar;t
xref:BloombergLP/bdlc/FlatHashTable/erase-0d.adoc[erase](KEY const& key);
----

[.small]#xref:BloombergLP/bdlc/FlatHashTable/erase-0d.adoc[_» more&period;&period;&period;_]#

Remove the entry with the specified `key`, if present&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class LOOKUP&lowbar;KEY&gt;
std::size&lowbar;t
xref:BloombergLP/bdlc/FlatHashTable/erase-06.adoc[erase](LOOKUP&lowbar;KEY&& key)
requires BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;HASH, LOOKUP&lowbar;KEY&gt;&colon;&colon;value
         &amp;&amp; BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;EQUAL,LOOKUP&lowbar;KEY&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlc/FlatHashTable/erase-06.adoc[_» more&period;&period;&period;_]#

Remove the entries in the half&hyphen;open range `&lsqb;first, last)&rsqb;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashTable/iterator.adoc[FlatHashTable&lt;KEY, ENTRY, ENTRY&lowbar;UTIL, HASH, EQUAL&gt;::iterator]
xref:BloombergLP/bdlc/FlatHashTable/erase-0b.adoc[erase](
    xref:BloombergLP/bdlc/FlatHashTable/const_iterator.adoc[const&lowbar;iterator] first,
    xref:BloombergLP/bdlc/FlatHashTable/const_iterator.adoc[const&lowbar;iterator] last);
----

[.small]#xref:BloombergLP/bdlc/FlatHashTable/erase-0b.adoc[_» more&period;&period;&period;_]#

== Return Value

* iterator following the erased entry
* 1 if an entry was erased, and 0 otherwise
* iterator equal to `last`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *position*
| iterator to the entry to remove
| *key*
| key of the entry to remove
| *first*
| beginning of the range to erase
| *last*
| end of the range to erase
|===


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