]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/test/statement/bug5715.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / phoenix / test / statement / bug5715.cpp
1 /*=============================================================================
2 Copyright (c) 2005-2007 Dan Marsden
3 Copyright (c) 2005-2007 Joel de Guzman
4 Copyright (c) 2014 John Fletcher
5
6 Distributed under the Boost Software License, Version 1.0. (See accompanying
7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 ==============================================================================*/
9
10 // Check for Bug5715
11
12 #include <boost/phoenix/statement/sequence.hpp>
13 #include <boost/phoenix/bind.hpp>
14
15 #include <boost/detail/lightweight_test.hpp>
16
17 namespace test
18 {
19 int x = 0;
20 int y = 0;
21 int z = 0;
22
23 void f() { ++x; ++y; }
24 void g() { --x; ++z; }
25
26 }
27 int main()
28 {
29 (
30 boost::phoenix::bind(test::f),
31 boost::phoenix::bind(test::g)
32 )();
33 BOOST_TEST(test::x == 0);
34 BOOST_TEST(test::y == 1);
35 BOOST_TEST(test::z == 1);
36 }