min_max.cpp 718 B

123456789101112131415161718192021222324252627
  1. // Copyright Aleksey Gurtovoy 2000-2004
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // See http://www.boost.org/libs/mpl for documentation.
  8. // $Id$
  9. // $Date$
  10. // $Revision$
  11. #include <boost/mpl/min_max.hpp>
  12. #include <boost/mpl/int.hpp>
  13. #include <boost/mpl/aux_/test.hpp>
  14. MPL_TEST_CASE()
  15. {
  16. MPL_ASSERT(( is_same< mpl::min< int_<5>,int_<7> >::type,int_<5> > ));
  17. MPL_ASSERT(( is_same< mpl::max< int_<5>,int_<7> >::type,int_<7> > ));
  18. MPL_ASSERT(( is_same< mpl::min< int_<-5>,int_<-7> >::type,int_<-7> > ));
  19. MPL_ASSERT(( is_same< mpl::max< int_<-5>,int_<-7> >::type,int_<-5> > ));
  20. }