Standard C++ Library Reference ISO/IEC (VERSION3)
function returns count. It evaluates the predicate exactly last - first times.
equal
template<class InIt1, class InIt2>
bool equal(InIt1 first1, InIt1 last1, InIt2 first2);
template<class InIt1, class InIt2, class Pr>
bool equal(InIt1 first1, InIt1 last1, InIt2 first2, Pr pred);
The first template function returns true only if, for each N in the range [0, last1 -
first1), the predicate *(first1 + N) == *(first2 + N) is true. Here,
operator== must perform a pairwise comparison between its operands. The function
evaluates the predicate at most once for each N.
The second template function behaves the same, except that the predicate is pred(*(first1
+ N), *(first2 + N)).
equal_range
template<class FwdIt, class Ty>
pair<FwdIt, FwdIt> equal_range(FwdIt first,
FwdIt last, const Ty& val);
template<class FwdIt, class Ty, class Pr>
pair<FwdIt, FwdIt> equal_range(FwdIt first,
FwdIt last, const Ty& val, Pr pred);
The first template function effectively returns pair( lower_bound(first, last,
val), upper_bound(first, last, val)), where the elements designated by
iterators in the range [first, last) form a sequence ordered by operator<. Thus, the
function determines the largest range of positions over which val can be inserted in the
sequence and still preserve its ordering.
The function evaluates the ordering predicate X < Y at most ceil(2 * log(last -
first)) + 1.
The second template function behaves the same, except that it replaces operator<(X, Y)
with pred(X, Y).
fill
template<class FwdIt, class Ty>
void fill(FwdIt first, FwdIt last, const Ty& val);
The template function evaluates *(first + N) = val once for each N in the range [0,
last - first).