Standard C++ Library Reference ISO/IEC (VERSION3)
template<class FwdIt1, class FwdIt2, class Pr>
FwdIt1 find_first_of(FwdIt1 first1, FwdIt1 last1,
FwdIt2 first2, FwdIt2 last2, Pr pred);
The first template function determines the lowest value of N in the range [0, last1 -
first1) such that for some M in the range [0, last2 - first2), the predicate
*(first1 + N) == *(first2 + M) is true. Here, operator== must perform a
pairwise comparison between its operands. It then returns first1 + N. If no such value exists,
the function returns last1. It evaluates the predicate at most (last1 - first1) *
(last2 - first2) times.
The second template function behaves the same, except that the predicate is pred(*(first1
+ N), *(first2 + M)).
find_if
template<class InIt, class Pr>
InIt find_if(InIt first, InIt last, Pr pred);
The template function determines the lowest value of N in the range [0, last - first) for
which the predicate pred(*(first + N)) is true. It then returns first + N. If no such
value exists, the function returns last. It evaluates the predicate at most once for each N.
for_each
template<class InIt, class Fn1>
Fn1 for_each(InIt first, InIt last, Fun func);
The template function evaluates func(*(first + N)) once for each N in the range [0,
last - first). It then returns func.
generate
template<class FwdIt, class Fn0>
void generate(FwdIt first, FwdIt last, Fn0 func);
The template function evaluates *(first + N) = func() once for each N in the range
[0, last - first).
generate_n
template<class OutIt, class Pr, class Fn0>
void generate_n(OutIt first, Diff count, Fn0 func);
The template function evaluates *(first + N) = func() once for each N in the range