]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/test/sequence/swap.cpp
1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2006 Dan Marsden
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #include <boost/fusion/sequence/intrinsic/swap.hpp>
9 #include <boost/fusion/container/vector.hpp>
10 #include <boost/fusion/container/generation/make_vector.hpp>
11 #include <boost/fusion/sequence/comparison/equal_to.hpp>
12 #include <boost/detail/lightweight_test.hpp>
14 #include <boost/mpl/assert.hpp>
16 #include <boost/type_traits/is_same.hpp>
22 namespace fusion
= boost::fusion
;
24 typedef fusion::vector
<std::vector
<int>, char> test_vector
;
25 BOOST_MPL_ASSERT((boost::is_same
<void, boost::fusion::result_of::swap
<test_vector
, test_vector
>::type
>));
27 test_vector
v1(std::vector
<int>(1, 101), 'a'), v2(std::vector
<int>(1, 202), 'b');
31 BOOST_TEST(v1
== fusion::make_vector(std::vector
<int>(1, 202), 'b'));
32 BOOST_TEST(v2
== fusion::make_vector(std::vector
<int>(1, 101), 'a'));
34 return boost::report_errors();