]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/test/algorithm/zip2.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / fusion / test / algorithm / zip2.cpp
1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2006 Dan Marsden
4
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/detail/lightweight_test.hpp>
9 #include <boost/fusion/algorithm/transformation/zip.hpp>
10 #include <boost/fusion/sequence/comparison/equal_to.hpp>
11 #include <boost/fusion/adapted/mpl.hpp>
12 #include <boost/mpl/vector.hpp>
13
14 int main()
15 {
16 using namespace boost::fusion;
17 {
18 const vector2<int,int> shorter(1,2);
19 const vector3<char,char,char> longer('a', 'b', 'c');
20 const vector2<vector2<int,char>, vector2<int,char> > result(vector2<int,char>(1,'a'), vector2<int,char>(2,'b'));
21 BOOST_TEST(zip(shorter, longer) == result);
22 }
23 {
24 const vector3<int,int,int> longer(1,2,3);
25 const vector2<char,char> shorter('a', 'b');
26 const vector2<vector2<int,char>, vector2<int,char> > result(vector2<int,char>(1,'a'), vector2<int,char>(2,'b'));
27 BOOST_TEST(zip(longer, shorter) == result);
28 }
29 return boost::report_errors();
30 }