template <ForwardIterator I, Sentinel<I> S, class T, class Proj = identity,
IndirectStrictWeakOrder<const T*, projected<I, Proj>> Comp = less<>>
tagged_pair<tag::begin(I), tag::end(I)>
equal_range(I first, S last, const T& value, Comp comp = Comp{}, Proj proj = Proj{});
template <ForwardRange Rng, class T, class Proj = identity,
IndirectStrictWeakOrder<const T*, projected<iterator_t<Rng>, Proj>> Comp = less<>>
tagged_pair<tag::begin(safe_iterator_t<Rng>),
tag::end(safe_iterator_t<Rng>)>
equal_range(Rng&& rng, const T& value, Comp comp = Comp{}, Proj proj = Proj{});
Requires:
The elements
e
of
[first,last)
shall be partitioned with respect to the expressions
invoke(comp, invoke(proj, e), value)
and
!invoke(comp, value, invoke(proj, e)).
Also, for all elements
e
of
[first, last),
invoke(comp, invoke(proj, e), value)
shall imply
!invoke(comp, value, invoke(proj, e)).
Returns:
Complexity: At most 2 * log2(last - first) + Ο(1) applications of the comparison function and projection.