]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpl/test/pop_front.cpp
2 // Copyright Aleksey Gurtovoy 2000-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/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>
22 typedef list
<long>::type types1
;
23 typedef list
<int,long>::type types2
;
24 typedef list
<char,int,long>::type types3
;
26 typedef pop_front
<types1
>::type result1
;
27 typedef pop_front
<types2
>::type result2
;
28 typedef pop_front
<types3
>::type result3
;
30 MPL_ASSERT_RELATION( size
<result1
>::value
, ==, 0 );
31 MPL_ASSERT_RELATION( size
<result2
>::value
, ==, 1 );
32 MPL_ASSERT_RELATION( size
<result3
>::value
, ==, 2 );
34 MPL_ASSERT(( is_same
< front
<result2
>::type
, long > ));
35 MPL_ASSERT(( is_same
< front
<result3
>::type
, int > ));