In the doc (1.54.0) for algorithms under C++14, the first code segment under both equal and mismatch, the last line (for equal here) showsstd::equal ( seq1.begin (), seq1.end (), seq1.begin (), seq2.end ()); // false^^^^^^Shouldn’t that bestd::equal ( seq1.begin (), seq1.end (), seq2.begin (), seq2.end ()); // false^^^^^^Similar for mismatch.