]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpl/test/joint_view.cpp
2 // Copyright Aleksey Gurtovoy 2001-2004
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)
8 // See http://www.boost.org/libs/mpl for documentation.
14 #include <boost/mpl/joint_view.hpp>
16 #include <boost/mpl/range_c.hpp>
17 #include <boost/mpl/list.hpp>
18 #include <boost/mpl/equal.hpp>
19 #include <boost/mpl/size.hpp>
20 #include <boost/mpl/aux_/test.hpp>
30 typedef range_c
<int,0,15> answer
;
32 MPL_ASSERT(( equal
<numbers
,answer
> ));
33 MPL_ASSERT(( equal
<numbers::type
,answer
> ));
34 MPL_ASSERT_RELATION( size
<numbers
>::value
, ==, 15 );
37 template< typename View
> struct test_is_empty
39 typedef typename begin
<View
>::type first_
;
40 typedef typename end
<View
>::type last_
;
42 MPL_ASSERT_RELATION( size
<View
>::value
, ==, 0 );
43 MPL_ASSERT(( is_same
< first_
,last_
> ));
45 MPL_ASSERT_INSTANTIATION( View
);
46 MPL_ASSERT_INSTANTIATION( first_
);
47 MPL_ASSERT_INSTANTIATION( last_
);
52 test_is_empty
< joint_view
< list0
<>,list0
<> > >();
53 test_is_empty
< joint_view
< list
<>,list0
<> > >();
54 test_is_empty
< joint_view
< list
<>,list
<> > >();
55 test_is_empty
< joint_view
< list
<>, joint_view
< list0
<>,list0
<> > > >();