Standard C++ Library Reference ISO/IEC (VERSION3)
The second template function behaves the same, except that it replaces operator<(X, Y)
with pred(X, Y).
copy
template<class InIt, class OutIt>
OutIt copy(InIt first, InIt last, OutIt dest);
The template function evaluates *(dest + N) = *(first + N)) once for each N in the
range [0, last - first), for strictly increasing values of N beginning with the lowest
value. It then returns dest + N. If dest and first designate regions of storage, dest must
not be in the range [first, last).
copy_backward
template<class BidIt1, class BidIt2>
BidIt2 copy_backward(BidIt1 first, BidIt1 last,
BidIt2 dest);
The template function evaluates *(dest - N - 1) = *(last - N - 1)) once for
each N in the range [0, last - first), for strictly oncreasing values of N beginning with
the lowest value. It then returns dest - (last - first). If dest and first designate
regions of storage, dest must not be in the range [first, last).
count
template<class InIt, class Ty>
typename iterator_traits<InIt>::difference_type
count(InIt first, InIt last, const Ty& val);
The template function sets a count count to zero. It then executes ++count for each N in the
range [0, last - first) for which the predicate *(first + N) == val is true.
Here, operator== must perform a pairwise comparison between its operands. The function
returns count. It evaluates the predicate exactly last - first times.
count_if
template<class InIt, class Pr, class Dist>
typename iterator_traits<InIt>::difference_type
count_if(InIt first, InIt last,
Pr pred);
The template function sets a count count to zero. It then executes ++count for each N in the
range [0, last - first) for which the predicate pred(*(first + N)) is true. The