Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/mpl/test/zip_view.cpp @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.0 KB
Line 
1
2// Copyright Aleksey Gurtovoy 2002-2004
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// $Source: /cvsroot/boost/boost/libs/mpl/test/zip_view.cpp,v $
11// $Date: 2004/09/02 15:41:35 $
12// $Revision: 1.4 $
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
29MPL_TEST_CASE()
30{
31    typedef transform_view<
32          zip_view< vector< range_c<int,0,10>, range_c<int,10,20> > >
33        , unpack_args< plus<> >
34        > result;
35
36    MPL_ASSERT(( equal< 
37          result
38        , filter_view< range_c<int,10,30>, is_even<_> >
39        , equal_to<_,_>
40        > ));
41}
Note: See TracBrowser for help on using the repository browser.