|
|
Returns the first mismatching pair of elements from two ranges |
|
|
Return value std::pair with iterators to the first two non-equal elements.(until C++14) If no mismatches are found when the comparison reaches last1 , the pair holds last1 and the corresponding iterator from the second range. The behavior is undefined if the second range is shorter than the first range.(since C++14) If no mismatches are found when the comparison reaches last1 or last2 , whichever happens first, the pair holds the end iterator and the corresponding iterator from the other range. |
last1
and last2
might not actually be range1.end()
or range2.end()
, even though they are to be treated as such in the context of this function’s operation.(result.first != last1) and (result.second != last2)
, (result.first == last1) or (result.second == last2)
.result.second
depends on which overload of the algorithm you use and how carefully you use it.