Ticket #5824: main.cpp

File main.cpp, 323 bytes (added by gredner@…, 11 years ago)

Self-contained test case illustrating the problem. The program compiles cleanly (with g++ 4.4.5 -Wall -Wextra -pedantic) both with and without the marked #include, but its observable behavior differs.

Line 
1#include <boost/phoenix/core.hpp>
2#include <boost/phoenix/operator.hpp>
3
4// Without this include, the program prints 1. With it, it prints 2.
5//#include <boost/phoenix/scope.hpp>
6
7#include <iostream>
8
9using namespace boost::phoenix::arg_names;
10
11int main()
12{
13 int a;
14 (++arg1, ++arg1)(a);
15 std::cout << a << std::endl;
16}