min_element.hpp 815 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED
  2. #define BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED
  3. // Copyright David Abrahams 2004
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. // (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // See http://www.boost.org/libs/mpl for documentation.
  10. // $Id$
  11. // $Date$
  12. // $Revision$
  13. #include <boost/mpl/max_element.hpp>
  14. #include <boost/mpl/not.hpp>
  15. namespace boost { namespace mpl {
  16. BOOST_MPL_AUX_COMMON_NAME_WKND(min_element)
  17. template<
  18. typename BOOST_MPL_AUX_NA_PARAM(Sequence)
  19. , typename Predicate = less<_,_>
  20. >
  21. struct min_element
  22. : max_element<
  23. Sequence
  24. , mpl::not_<Predicate>
  25. >
  26. {
  27. };
  28. BOOST_MPL_AUX_NA_SPEC(1, min_element)
  29. }}
  30. #endif // BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED