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/core/lightweight_test.hpp> 16 17 namespace test 18 { 19 int x = 0; 20 int y = 0; 21 int z = 0; 22 f()23 void f() { ++x; ++y; } g()24 void g() { --x; ++z; } 25 26 } main()27int 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 return boost::report_errors(); 37 } 38