Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/spirit/fusion/test/any_tests.cpp @ 29

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

updated boost from 1_33_1 to 1_34_1

File size: 1015 bytes
Line 
1/*=============================================================================
2    Copyright (c) 2003 Joel de Guzman
3    Copyright (c) 2005 Eric Niebler
4
5    Use, modification and distribution is subject to the Boost Software
6    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7    http://www.boost.org/LICENSE_1_0.txt)
8==============================================================================*/
9#include <boost/detail/lightweight_test.hpp>
10#include <boost/spirit/fusion/sequence/tuple.hpp>
11#include <boost/spirit/fusion/algorithm/any.hpp>
12#include <boost/spirit/fusion/algorithm/for_each.hpp>
13#include <boost/lambda/lambda.hpp>
14
15int
16main()
17{
18/// Testing any
19
20    {
21        boost::fusion::tuple<int,short,double> t(1, 2, 3.3);
22        BOOST_TEST((boost::fusion::any(t, boost::lambda::_1 == 2)));
23    }
24
25    {
26        boost::fusion::tuple<int,short,double> t(1, 2, 3.3);
27        BOOST_TEST((!boost::fusion::any(t, boost::lambda::_1 == 3)));
28    }
29
30    return boost::report_errors();
31}
32
Note: See TracBrowser for help on using the repository browser.