Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/mpl/test/replace_if.cpp @ 44

Last change on this file since 44 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 969 bytes
Line 
1
2// Copyright Aleksey Gurtovoy 2000-2004
3// Copyright John R. Bandela 2000-2002
4// Copyright David Abrahams 2003-2004
5//
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)
9//
10// See http://www.boost.org/libs/mpl for documentation.
11
12// $Source: /cvsroot/boost/boost/libs/mpl/test/replace_if.cpp,v $
13// $Date: 2004/09/02 15:41:35 $
14// $Revision: 1.5 $
15
16#include <boost/mpl/replace_if.hpp>
17
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>
23
24#include <boost/mpl/aux_/test.hpp>
25
26MPL_TEST_CASE()
27{
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;
30
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> > ));
33}
Note: See TracBrowser for help on using the repository browser.