[#bsl-set-0d-erase-05] = xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::erase :relfileprefix: ../../ :mrdocs: `erase` overloads == Synopses Declared in `<bslstl_set.h>` Remove the element at the specified `position`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/iterator.adoc[set<KEY, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/set-0d/erase-0b.adoc[erase](xref:bsl/set-0d/const_iterator.adoc[const_iterator] position); ---- [.small]#xref:bsl/set-0d/erase-0b.adoc[_» more..._]# Remove the element equivalent to the specified `key`, if present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/size_type.adoc[set<KEY, COMPARATOR, ALLOCATOR>::size_type] xref:bsl/set-0d/erase-0d.adoc[erase](xref:bsl/set-0d/key_type.adoc[key_type] const& key); ---- [.small]#xref:bsl/set-0d/erase-0d.adoc[_» more..._]# Same as the preceding overload, using a transparent `key`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_KEY> xref:bsl/set-0d/size_type.adoc[size_type] xref:bsl/set-0d/erase-04.adoc[erase](t_KEY&& key) requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR, t_KEY>::value && !is_convertible<BSLS_COMPILERFEATURES_FORWARD_REF(t_KEY), iterator>::value && !is_convertible<BSLS_COMPILERFEATURES_FORWARD_REF(t_KEY), const_iterator>::value; ---- [.small]#xref:bsl/set-0d/erase-04.adoc[_» more..._]# Remove the elements in the half‐open range `[first .. last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/iterator.adoc[set<KEY, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/set-0d/erase-0e.adoc[erase]( xref:bsl/set-0d/const_iterator.adoc[const_iterator] first, xref:bsl/set-0d/const_iterator.adoc[const_iterator] last); ---- [.small]#xref:bsl/set-0d/erase-0e.adoc[_» more..._]# == Return Value * iterator to the element following the erased element * 1 if an element was erased, otherwise 0 * `last` == Parameters [cols="1,4"] |=== | Name| Description | *position* | iterator to the element to remove | *key* | key of the element to remove | *first* | beginning of the range to erase (inclusive) | *last* | end of the range to erase (exclusive) |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#