
On Fri, Apr 16, 2010 at 7:47 PM, philip tucker
On 16 Apr 2010, at 6:16 PM, OvermindDL1 wrote:
start %= (constitkind >> (id > ':' > id) >> probs) % ",";
Thanks, but I already tried it. Doesn't compile.
Er, if you re-read my post I was saying *not* to do that, because that will not work, that is actually what the compiler is doing because of operator precedence. You should memorize the precedence rules for C++, *especially* if you are going to be dealing with heavily templated operator libraries like Spirit. http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B Because you are mixing right-shifts (>>) and greater-than's (>), the precedence causes them to collapse in different ways, which is why you need the parenthesis like this: start %= (constitkind >> (id > (':' > (id >> probs)))) % ","; Again, learn the C++ operator precedence rules and all this will make easy sense. :)