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 |
|
---|
11 | namespace phoenix = boost::phoenix;
|
---|
12 | using namespace phoenix::local_names;
|
---|
13 |
|
---|
14 | int 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 |
|
---|