erase overloads
Declared in <bslstl_set.h>
Remove the element at the specified position.
set<KEY, COMPARATOR, ALLOCATOR>::iterator
erase(const_iterator position);
» more...
Remove the element equivalent to the specified key, if present.
set<KEY, COMPARATOR, ALLOCATOR>::size_type
erase(key_type const& key);
» more...
Same as the preceding overload, using a transparent key.
template<class t_KEY>
size_type
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;
» more...
Remove the elements in the half-open range [first .. last)].
set<KEY, COMPARATOR, ALLOCATOR>::iterator
erase(
const_iterator first,
const_iterator last);
» more...
last| 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) |