1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
hi(minmax) hi(minmax_element)
itemization(
it() Header file: tt(<algorithm>)
it() Function prototypes:
itemization(
itt(pair<Type const &, Type const &> minmax(
Type const &t1, Type const &t2);)
itt(pair<Type const &, Type const &> minmax(Type const &t1,
Type const &t2, BinaryPred pred);)
itt(pair<Type const &, Type const &> minmax(
std:initializer<list<Type> values);)
itt(pair<Type const &, Type const &> minmax(
std:initializer<list<Type> values, BinaryPred pred);)
)
it() Description:
itemization(
it() The first prototype: return a tt(std::pair) whose tt(first)
and tt(second) members contain, respectively, the smaller and the larger value
of the function's arguments, using tt(Type's operator<) to compare the two
values.
it() The second prototype: identical to the first prototype, but
deciding that tt(t1) is the smaller element if tt(pred(t1, t2)) returns
tt(true).
it() Prototypes three and four act identically to, respectively,
prototypes one and two, but return, the smallest and largest values found in
the provided tt(iterator_range) objects.
)
it() Example:
verbinclude(-a examples/minmax.cc)
)
|