1 
2 // Copyright Aleksey Gurtovoy 2000-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 // $Id$
11 // $Date$
12 // $Revision$
13 
14 #include <boost/mpl/pop_front.hpp>
15 #include <boost/mpl/list.hpp>
16 #include <boost/mpl/size.hpp>
17 #include <boost/mpl/front.hpp>
18 #include <boost/mpl/aux_/test.hpp>
19 
MPL_TEST_CASE()20 MPL_TEST_CASE()
21 {
22     typedef list<long>::type types1;
23     typedef list<int,long>::type types2;
24     typedef list<char,int,long>::type types3;
25 
26     typedef pop_front<types1>::type result1;
27     typedef pop_front<types2>::type result2;
28     typedef pop_front<types3>::type result3;
29 
30     MPL_ASSERT_RELATION( size<result1>::value, ==, 0 );
31     MPL_ASSERT_RELATION( size<result2>::value, ==, 1 );
32     MPL_ASSERT_RELATION( size<result3>::value, ==, 2 );
33 
34     MPL_ASSERT(( is_same< front<result2>::type, long > ));
35     MPL_ASSERT(( is_same< front<result3>::type, int > ));
36 }
37