August 2012
Intermediate to advanced
976 pages
30h 17m
English
These algorithms require input iterators for their first two arguments.
The equal and mismatch algorithms also take an additional input iterator that denotes the start of a second range. They also provide two overloaded versions. The first version uses equality (==) operator of the underlying type to compare elements; the second version compares elements using the user-supplied unaryPred or binaryPred.
for_each(beg, end, unaryOp)
Applies the callable object (§ 10.3.2, p. 388) unaryOp to each element in its input range. The return value from unaryOp (if any) is ignored. If the iterators allow writing to elements through the dereference operator, then unaryOp may modify the elements.
mismatch(beg1, end1, beg2) ...
Read now
Unlock full access