join.cpp 1.1 KB

12345678910111213141516171819202122232425262728
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Copyright (c) 2006 Dan Marsden
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #include <boost/detail/lightweight_test.hpp>
  8. #include <boost/fusion/algorithm/transformation/join.hpp>
  9. #include <boost/fusion/container/generation/make_vector.hpp>
  10. #include <boost/fusion/sequence/comparison/equal_to.hpp>
  11. #include <boost/fusion/adapted/mpl.hpp>
  12. #include <boost/mpl/vector/vector10_c.hpp>
  13. int main()
  14. {
  15. using namespace boost::fusion;
  16. {
  17. BOOST_TEST(join(make_vector(1,2), make_vector('a','b')) == make_vector(1,2,'a','b'));
  18. }
  19. {
  20. typedef boost::mpl::vector2_c<int,1,2> vec1;
  21. typedef boost::mpl::vector2_c<int,3,4> vec2;
  22. BOOST_TEST(join(vec1(), vec2()) == make_vector(1,2,3,4));
  23. }
  24. return boost::report_errors();
  25. }