reverse.cpp 746 B

1234567891011121314151617181920212223242526272829303132
  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/reverse.hpp>
  12. #include <boost/mpl/list_c.hpp>
  13. #include <boost/mpl/range_c.hpp>
  14. #include <boost/mpl/equal.hpp>
  15. #include <boost/mpl/equal_to.hpp>
  16. #include <boost/mpl/at.hpp>
  17. #include <boost/mpl/aux_/test.hpp>
  18. MPL_TEST_CASE()
  19. {
  20. typedef list_c<int,9,8,7,6,5,4,3,2,1,0> numbers;
  21. typedef reverse< numbers >::type result;
  22. typedef range_c<int,0,10> answer;
  23. MPL_ASSERT(( equal< result,answer,equal_to<_1,_2> > ));
  24. }