|
Last change
on this file since 12 was
12,
checked in by landauf, 18 years ago
|
|
added boost
|
-
Property svn:executable set to
*
|
|
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 | |
|---|
| 15 | int |
|---|
| 16 | main() |
|---|
| 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.