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_RELATION( size<numbers>::value, ==, 15 );
36 template< typename View > struct test_is_empty
38 typedef typename begin<View>::type first_;
39 typedef typename end<View>::type last_;
41 MPL_ASSERT_RELATION( size<View>::value, ==, 0 );
42 MPL_ASSERT(( is_same< first_,last_> ));
44 MPL_ASSERT_INSTANTIATION( View );
45 MPL_ASSERT_INSTANTIATION( first_ );
46 MPL_ASSERT_INSTANTIATION( last_ );
51 test_is_empty< joint_view< list0<>,list0<> > >();
52 test_is_empty< joint_view< list<>,list0<> > >();
53 test_is_empty< joint_view< list<>,list<> > >();
54 test_is_empty< joint_view< list<>, joint_view< list0<>,list0<> > > >();