is_pair.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. [auto_generated]
  3. libs/numeric/odeint/test/is_pair.cpp
  4. [begin_description]
  5. This file tests the is_pair meta-function.
  6. [end_description]
  7. Copyright 2011-2012 Karsten Ahnert
  8. Copyright 2011-2012 Mario Mulansky
  9. Distributed under the Boost Software License, Version 1.0.
  10. (See accompanying file LICENSE_1_0.txt or
  11. copy at http://www.boost.org/LICENSE_1_0.txt)
  12. */
  13. #define BOOST_TEST_MODULE odeint_is_pair
  14. #include <utility>
  15. #include <boost/test/unit_test.hpp>
  16. #include <boost/static_assert.hpp>
  17. #include <boost/numeric/odeint/util/is_pair.hpp>
  18. using namespace boost::numeric::odeint;
  19. BOOST_AUTO_TEST_SUITE( is_pair_test )
  20. BOOST_AUTO_TEST_CASE( test_is_pair )
  21. {
  22. typedef std::pair< int , int > type1;
  23. typedef std::pair< int& , int > type2;
  24. typedef std::pair< int , int& > type3;
  25. typedef std::pair< int& , int& > type4;
  26. typedef std::pair< const int , int > type5;
  27. typedef std::pair< const int& , int > type6;
  28. BOOST_STATIC_ASSERT(( is_pair< type1 >::value ));
  29. BOOST_STATIC_ASSERT(( is_pair< type2 >::value ));
  30. BOOST_STATIC_ASSERT(( is_pair< type3 >::value ));
  31. BOOST_STATIC_ASSERT(( is_pair< type4 >::value ));
  32. BOOST_STATIC_ASSERT(( is_pair< type5 >::value ));
  33. BOOST_STATIC_ASSERT(( is_pair< type6 >::value ));
  34. }
  35. BOOST_AUTO_TEST_SUITE_END()