[#bsl-set-0d-equal_range-07] = xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::equal_range :relfileprefix: ../../ :mrdocs: `equal_range` overloads == Synopses Declared in `<bslstl_set.h>` Return a pair of iterators providing modifiable access to the sequence of `value_type` objects in this set that are equivalent to the specified `key`, where the first iterator is positioned at the start of the sequence, and the second is positioned one past the end of the sequence. The first returned iterator will be `lower_bound(key)`; the second returned iterator will be `upper_bound(key)`; and, if this set contains no `value_type` objects equivalent to `key`, then the two returned iterators will have the same value. Note that since a set maintains unique keys, the range will contain at most one element. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/pair-0b.adoc[pair<iterator, iterator>] xref:bsl/set-0d/equal_range-08f.adoc[equal_range](xref:bsl/set-0d/key_type.adoc[key_type] const& key); ---- [.small]#xref:bsl/set-0d/equal_range-08f.adoc[_» more..._]# Return a pair of iterators providing non‐modifiable access to the sequence of `value_type` objects in this set that are equivalent to the specified `key`, where the first iterator is positioned at the start of the sequence, and the second is positioned one past the end of the sequence. The first returned iterator will be `lower_bound(key)`; the second returned iterator will be `upper_bound(key)`; and, if this set contains no `value_type` objects equivalent to `key`, then the two returned iterators will have the same value. Note that since a set maintains unique keys, the range will contain at most one element. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/pair-0b.adoc[pair<const_iterator, const_iterator>] xref:bsl/set-0d/equal_range-085.adoc[equal_range](xref:bsl/set-0d/key_type.adoc[key_type] const& key) const; ---- [.small]#xref:bsl/set-0d/equal_range-085.adoc[_» more..._]# Return a pair of iterators providing modifiable access to the sequence of `value_type` objects in this set that are equivalent to the specified `key`, where the first iterator is positioned at the start of the sequence, and the second is positioned one past the end of the sequence. The first returned iterator will be `lower_bound(key)`; the second returned iterator will be `upper_bound(key)`; and, if this set contains no `value_type` objects equivalent to `key`, then the two returned iterators will have the same value. Note that although a set maintains unique keys, the range may contain more than one element, because a transparent comparator may have been supplied that provides a different (but compatible) partitioning of keys for `LOOKUP_KEY` as the comparisons used to order the keys in the set. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class LOOKUP_KEY> xref:bsl/pair-0b.adoc[pair<iterator, iterator>] xref:bsl/set-0d/equal_range-0b.adoc[equal_range](LOOKUP_KEY const& key) requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR, LOOKUP_KEY>::value; ---- [.small]#xref:bsl/set-0d/equal_range-0b.adoc[_» more..._]# Return a pair of iterators providing non‐modifiable access to the sequence of `value_type` objects in this set that are equivalent to the specified `key`, where the first iterator is positioned at the start of the sequence, and the second is positioned one past the end of the sequence. The first returned iterator will be `lower_bound(key)`; the second returned iterator will be `upper_bound(key)`; and, if this set contains no `value_type` objects equivalent to `key`, then the two returned iterators will have the same value. Note that although a set maintains unique keys, the range may contain more than one element, because a transparent comparator may have been supplied that provides a different (but compatible) partitioning of keys for `LOOKUP_KEY` as the comparisons used to order the keys in the set. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class LOOKUP_KEY> xref:bsl/pair-0b.adoc[pair<const_iterator, const_iterator>] xref:bsl/set-0d/equal_range-083.adoc[equal_range](LOOKUP_KEY const& key) const requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR, LOOKUP_KEY>::value; ---- [.small]#xref:bsl/set-0d/equal_range-083.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#