| default (1) | template <class ForwardIterator> pair<ForwardIterator,ForwardIterator> minmax_element (ForwardIterator first, ForwardIterator last); |
|---|---|
| custom (2) | template <class ForwardIterator, class Compare> pair<ForwardIterator,ForwardIterator> minmax_element (ForwardIterator first, ForwardIterator last, Compare comp); |
[first,last) as first element, and the largest as second.operator< for the first version, orcomp for the second.[first,last), which contains all the elements betweenfirst andlast, including the element pointed byfirst but not the element pointed bylast.bool. The value returned indicates whether the element passed as first argument is considered less than the second.[first,last) as first element, and the largest as second. | |
min is 2, at position 2max is 9, at position 3 |
1.5 times one less than the number of elements compared.[first,last) are accessed.