Ticket #8298: phx_bug.cpp

File phx_bug.cpp, 584 bytes (added by Paul Keir <pkeir@…>, 10 years ago)
Line 
1#include <iostream>
2#include <boost/phoenix.hpp>
3
4// clang error with C++11 flag.
5/*/home/XXXXX/code/boost_1_53_0/boost/proto/transform/default.hpp:154:41: error: read-only variable is not assignable
6 BOOST_PROTO_BINARY_DEFAULT_EVAL(=, assign, make_mutable, make)
7 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 ...
9*/
10
11namespace phoenix = boost::phoenix;
12using namespace phoenix::local_names;
13
14int main(int argc, char *argv[])
15{
16 phoenix::lambda(_a=17)[
17 _a = 18,
18 std::cout << _a << std::endl
19 ]()();
20
21 return 0;
22}
23