29 Jan
2014
29 Jan
'14
12:03 p.m.
Can somebody take a look at bug #9580? It's a C++ puzzle. Two as if equivalent expressions demonstrate different behavior. This one auto expr = (this->self("SOME_STATE") += someTokenDef); calls boost::proto::detail::exprns_::operator +=.
However this auto lex_def = this->self("SOME_STATE"); auto expr = (lex_def += someTokenDef); calls boost::spirit::lex::detail::operator +=.
My guess is that it changes templates instantiaon order, but still I can't explain it and thus can't fix it.
The first has an rvalue as its left hand side operand, while the second one uses an lvalue there. Not sure how to solve this after a cursory glance, though. Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.edu