• The first form returns whether the elements in the range [beg,end) are equal to the elements in
the range starting with cmpBeg.
• The second form returns whether each call of the binary predicate
op(elem,cmpElem)
with the corresponding elements in the range [beg,end) and in the range starting with cmpBeg
yields true.
• Note that op should not change its state during a function call. See Section 10.1.4, page 483, for
details.
• op should not modify the passed arguments.
• The caller must ensure that the range starting with cmpBeg contains enough elements.
• To determine the details of any differences, you should use the mismatch() algorithm (see
page 546).
• To determine whether two sequences contain the same elements in different order, algorithm
is_permutation() is provided since C++11 (see page 544).
• Complexity: linear (at most, numElems comparisons or calls of op(), respectively).