cpp/algorithm/for each n

@1@ Applies the given function object to the result of dereferencing every iterator in the range, in order. @2@ Applies the given function object  to the result of dereferencing every iterator in the range  (not necessarily in order). The algorithm is executed according to.

For both overloads, if the iterator type is mutable, may modify the elements of the range through the dereferenced iterator. If returns a result, the result is ignored. If is less than zero, the behavior is undefined.

Unlike the rest of the parallel algorithms, is not allowed to make copies of the elements in the sequence even if they are trivially copyable.

Return value
An iterator equal to, or more formally, to.

Complexity
Exactly applications of.

Possible implementation
See also the implementation in libstdc++, libc++ and MSVC stdlib.