1 
2 // Copyright Aleksey Gurtovoy 2002-2010
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // See http://www.boost.org/libs/mpl for documentation.
9 
10 // $Id$
11 // $Date$
12 // $Revision$
13 
14 #include <boost/mpl/zip_view.hpp>
15 
16 #include <boost/mpl/transform_view.hpp>
17 #include <boost/mpl/filter_view.hpp>
18 #include <boost/mpl/range_c.hpp>
19 #include <boost/mpl/vector.hpp>
20 #include <boost/mpl/at.hpp>
21 #include <boost/mpl/equal.hpp>
22 #include <boost/mpl/equal_to.hpp>
23 #include <boost/mpl/unpack_args.hpp>
24 #include <boost/mpl/math/is_even.hpp>
25 
26 #include <boost/mpl/aux_/test.hpp>
27 
28 #include <boost/type_traits/is_same.hpp>
29 
30 
MPL_TEST_CASE()31 MPL_TEST_CASE()
32 {
33     typedef transform_view<
34           zip_view< vector< range_c<int,0,10>, range_c<int,10,20> > >
35         , unpack_args< plus<> >
36         > result;
37 
38     MPL_ASSERT(( equal<
39           result
40         , filter_view< range_c<int,10,30>, is_even<_> >
41         , equal_to<_,_>
42         > ));
43 
44     MPL_ASSERT(( boost::is_same< zip_view<vector<> >, zip_view<vector<> >::type > ));
45 }
46