Daily bit(e) of C++ | std::mismatch
Daily bit(e) of C++ #320, Two-range comparison algorithm that returns the first pair of mismatched elements: std::mismatch.
The std::mismatch algorithm is a find-style algorithm that operates on two ranges and returns a pair of iterators to the first two elements that do not match / for which the binary predicate returns false.
With a customized comparator, the algorithm can operate as std::find with a per-element argument.