• The first form returns the first two corresponding elements of range [beg,end) and the range
starting with cmpBeg that differ.
• The second form returns the first two corresponding elements of range [beg,end) and the range
starting with cmpBeg for which the binary predicate
op(elem,cmpElem)
yields false.
• If no difference is found, a pair of end and the corresponding element of the second range
is returned. Note that this does not mean that both sequences are equal, because the second
sequence might contain more elements.
• 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 check whether two ranges are equal, you should use algorithm equal() (see Section 11.5.4,
page 542).
• Complexity: linear (at most, numElems comparisons or calls of op(), respectively).
The following example demonstrates both forms of mismatch():