]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpl/test/replace_if.cpp
2 // Copyright Aleksey Gurtovoy 2000-2004
3 // Copyright John R. Bandela 2000-2002
4 // Copyright David Abrahams 2003-2004
6 // Distributed under the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 // See http://www.boost.org/libs/mpl for documentation.
16 #include <boost/mpl/replace_if.hpp>
18 #include <boost/mpl/list/list10_c.hpp>
19 #include <boost/mpl/int.hpp>
20 #include <boost/mpl/equal.hpp>
21 #include <boost/mpl/greater.hpp>
22 #include <boost/mpl/equal_to.hpp>
24 #include <boost/mpl/aux_/test.hpp>
28 typedef list8_c
<int,1,4,5,2,7,5,3,5>::type numbers
;
29 typedef replace_if
< numbers
, greater
<_1
,int_
<4> >, int_
<0> >::type result
;
31 typedef list8_c
<int,1,4,0,2,0,0,3,0>::type answer
;
32 MPL_ASSERT(( equal
< answer
,result
,equal_to
<_1
,_2
> > ));