9 Jan
2016
9 Jan
'16
6:56 p.m.
On Sat, 9 Jan 2016 13:39:33 -0500
Lee Clagett
namespace phx = boost::phoenix; int foo; auto lazy_assign = (phx::ref(foo) = phx::placeholders::_1);
`lazy_assign` is a phoenix actor, whose `operator()` will take the first argument by const reference and assign it to `foo`. But it is also a phoenix actor like `phoenix::ref`, so:
lazy_assign = (phx::placeholders::_2);
tries to create new phoenix actor (lazy function), whose semantics are really confusing (and thus an error is likely appropriate).
I just realized this is valid code since `operator=` returns a reference to the left-hand-size. Although, its still an odd expression. Lee