[#nlohmann-basic_json-0c-erase-02]
= xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-0c.adoc[basic&lowbar;json]::erase
:relfileprefix: ../../
:mrdocs:

remove elements given an iterator range

== Synopsis

Declared in `&lt;nlohmann&sol;json&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class IteratorType&gt;
requires std&colon;&colon;is&lowbar;same&lt;IteratorType, typename basic&lowbar;json&lowbar;t&colon;&colon;iterator&gt;&colon;&colon;value &verbar;&verbar;
                   std&colon;&colon;is&lowbar;same&lt;IteratorType, typename basic&lowbar;json&lowbar;t&colon;&colon;const&lowbar;iterator&gt;&colon;&colon;value
IteratorType
erase(
    IteratorType first,
    IteratorType last);
----

== Return Value

iterator following the last removed element

== Parameters

[cols="1,4"]
|===
| Name| Description
| *first*
| iterator to the first element to remove
| *last*
| iterator following the last element to remove
|===


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