]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2001-2007 Joel de Guzman | |
3 | Copyright (c) 2007 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/container/vector.hpp> | |
10 | #include <boost/fusion/algorithm/transformation/zip.hpp> | |
11 | #include <boost/fusion/support/unused.hpp> | |
12 | #include <boost/fusion/iterator.hpp> | |
13 | #include <boost/fusion/sequence/intrinsic.hpp> | |
14 | ||
15 | int main() | |
16 | { | |
17 | using namespace boost::fusion; | |
18 | { | |
19 | vector<int, int> iv(1,2); | |
20 | vector<char, char> cv('a', 'b'); | |
21 | BOOST_TEST(at_c<0>(at_c<0>(zip(iv, unused, cv))) == 1); | |
22 | BOOST_TEST(at_c<2>(at_c<0>(zip(iv, unused, cv))) == 'a'); | |
23 | ||
24 | BOOST_TEST(at_c<0>(at_c<1>(zip(iv, unused, cv))) == 2); | |
25 | BOOST_TEST(at_c<2>(at_c<1>(zip(iv, unused, cv))) == 'b'); | |
26 | } | |
27 | return boost::report_errors(); | |
28 | } |