[#nlohmann-ordered_map-erase-0f] = xref:nlohmann.adoc[nlohmann]::xref:nlohmann/ordered_map.adoc[ordered_map]::erase :relfileprefix: ../../ :mrdocs: `erase` overloads == Synopses Declared in `<nlohmann/ordered_map.hpp>` removes the element at the given position [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:nlohmann/ordered_map/iterator.adoc[iterator] xref:nlohmann/ordered_map/erase-04.adoc[erase](xref:nlohmann/ordered_map/iterator.adoc[iterator] pos); ---- [.small]#xref:nlohmann/ordered_map/erase-04.adoc[_» more..._]# removes the element with the given key, if it exists [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:nlohmann/ordered_map/size_type.adoc[size_type] xref:nlohmann/ordered_map/erase-0b.adoc[erase](xref:nlohmann/ordered_map/key_type.adoc[key_type] const& key); ---- [.small]#xref:nlohmann/ordered_map/erase-0b.adoc[_» more..._]# removes the element with the given key, if it exists [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class KeyType> requires detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value xref:nlohmann/ordered_map/size_type.adoc[size_type] xref:nlohmann/ordered_map/erase-0c7.adoc[erase](KeyType&& key); ---- [.small]#xref:nlohmann/ordered_map/erase-0c7.adoc[_» more..._]# removes the elements in the range [first, last)] [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:nlohmann/ordered_map/iterator.adoc[iterator] xref:nlohmann/ordered_map/erase-0c9.adoc[erase]( xref:nlohmann/ordered_map/iterator.adoc[iterator] first, xref:nlohmann/ordered_map/iterator.adoc[iterator] last); ---- [.small]#xref:nlohmann/ordered_map/erase-0c9.adoc[_» more..._]# == Return Value * iterator following the removed element * number of elements removed (0 or 1) * iterator following the last removed element == Parameters [cols="1,4"] |=== | Name| Description | *pos* [in] | iterator to the element to remove | *key* [in] | key of the element to remove | *first* [in] | iterator to the first element to remove | *last* [in] | iterator past the last element to remove |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#