#include <boost/tuple/tuple.hpp> namespace boost { template <class T> tuple<T const&, T const&> > minmax(const T& a, const T& b); template <class T, class BinaryPredicate> tuple<T const&, T const&> > minmax(const T& a, const T& b, BinaryPredicate comp); }
#include <utility> //for std::pair namespace boost { template <class ForwardIterator> std::pair<ForwardIterator,ForwardIterator> minmax_element(ForwardIterator first, ForwardIterator last); template <class ForwardIterator, class BinaryPredicate> std::pair<ForwardIterator,ForwardIterator> minmax_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); // Variants template <class ForwardIterator> ForwardIterator first_min_element(ForwardIterator first, ForwardIterator last); template <class ForwardIterator, class BinaryPredicate> ForwardIterator first_min_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class ForwardIterator> ForwardIterator last_min_element(ForwardIterator first, ForwardIterator last); template <class ForwardIterator, class BinaryPredicate> ForwardIterator last_min_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class ForwardIterator> ForwardIterator first_max_element(ForwardIterator first, ForwardIterator last); template <class ForwardIterator, class BinaryPredicate> ForwardIterator first_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class ForwardIterator> ForwardIterator last_max_element(ForwardIterator first, ForwardIterator last); template <class ForwardIterator, class BinaryPredicate> ForwardIterator last_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class ForwardIterator> std::pair<ForwardIterator,ForwardIterator> first_min_first_max_element(ForwardIterator first, ForwardIterator last); template <class ForwardIterator, class BinaryPredicate> std::pair<ForwardIterator,ForwardIterator> first_min_first_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class ForwardIterator> std::pair<ForwardIterator,ForwardIterator> first_min_last_max_element(ForwardIterator first, ForwardIterator last); template <class ForwardIterator, class BinaryPredicate> std::pair<ForwardIterator,ForwardIterator> first_min_last_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class ForwardIterator> std::pair<ForwardIterator,ForwardIterator> last_min_first_max_element(ForwardIterator first, ForwardIterator last); template <class ForwardIterator, class BinaryPredicate> std::pair<ForwardIterator,ForwardIterator> last_min_first_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class ForwardIterator> std::pair<ForwardIterator,ForwardIterator> last_min_last_max_element(ForwardIterator first, ForwardIterator last); template <class ForwardIterator, class BinaryPredicate> std::pair<ForwardIterator,ForwardIterator> last_min_last_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); }
© Copyright Hervé Brönnimann, Polytechnic University, 2002--2004. Use, modification, and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file License_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)