Standard C++ Library Reference ISO/IEC (VERSION3)

[0, count).
includes
template<class InIt1, class InIt2>
bool includes(InIt1 first1, InIt1 last1,
InIt2 first2, InIt2 last2);
template<class InIt1, class InIt2, class Pr>
bool includes(InIt1 first1, InIt1 last1,
InIt2 first2, InIt2 last2, Pr pred);
The first template function determines whether a value of N exists in the range [0, last2 -
first2) such that, for each M in the range [0, last1 - first1), *(first1 + M)
and *(first2 + N) do not have equivalent ordering, where the elements designated by
iterators in the ranges [first1, last1) and [first2, last2) each form a sequence
ordered by operator<. If so, the function returns false. If no such value exists, it returns true.
Thus, the function determines whether the ordered sequence designated by iterators in the range
[first2, last2) all have equivalent ordering with some element designated by iterators in
the range [first1, last1).
The function evaluates the predicate at most 2 * ((last1 - first1) + (last2 -
first2)) - 1 times.
The second template function behaves the same, except that it replaces operator<(X, Y)
with pred(X, Y).
inplace_merge
template<class BidIt>
void inplace_merge(BidIt first, BidIt mid,
BidIt last);
template<class BidIt, class Pr>
void inplace_merge(BidIt first, BidIt mid,
BidIt last, Pr pred);
The first template function reorders the sequences designated by iterators in the ranges
[first, mid) and [mid, last), each ordered by operator<, to form a merged
sequence of length last - first beginning at first also ordered by operator<. The
merge occurs without altering the relative order of elements within either original sequence.
Moreover, for any two elements from different original sequences that have equivalent ordering,
the element from the ordered range [first, mid) precedes the other.
The function evaluates the ordering predicate X < Y at most ceil((last - first) *
log(last - first)) times. (Given enough temporary storage, it can evaluate the predicate
at most (last - first) - 1 times.)