1 
2 // Copyright Aleksey Gurtovoy 2004
3 // Copyright Alexander Nasonov 2004
4 //
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8 //
9 // See http://www.boost.org/libs/mpl for documentation.
10 
11 // $Id$
12 // $Date$
13 // $Revision$
14 
15 #include <boost/mpl/empty_sequence.hpp>
16 #include <boost/mpl/size.hpp>
17 #include <boost/mpl/distance.hpp>
18 #include <boost/mpl/advance.hpp>
19 #include <boost/mpl/begin_end.hpp>
20 #include <boost/mpl/equal.hpp>
21 #include <boost/mpl/aux_/test.hpp>
22 
23 #include <boost/type_traits/is_same.hpp>
24 #include <boost/type_traits/add_pointer.hpp>
25 
MPL_TEST_CASE()26 MPL_TEST_CASE()
27 {
28     typedef begin<empty_sequence>::type begin;
29     typedef end<empty_sequence>::type end;
30 
31     MPL_ASSERT(( is_same<begin,end> ));
32     MPL_ASSERT_RELATION( (mpl::distance<begin,end>::value), ==, 0 );
33     MPL_ASSERT_RELATION( size<empty_sequence>::value, ==, 0 );
34 
35     typedef advance_c<begin,0>::type advanced;
36     MPL_ASSERT(( is_same<advanced,end> ));
37 
38     MPL_ASSERT(( equal< empty_sequence, empty_sequence::type > ));
39 }
40