
Discover more from Daily bit(e) of C++
Random C++ knowledge organized in arbitrary order.
Over 1,000 subscribers
Continue reading
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.