
17 Apr
2010
17 Apr
'10
1:16 a.m.
On Fri, Apr 16, 2010 at 6:34 PM, philip tucker
This
start %= (constitkind > id > ':' > id >> probs) % ","; // FAILS
Should read
start %= (constitkind >> id > ':' > id >> probs) % ","; // FAILS
Sorry.
Because of how operator precedence works in C++. You should pretty well memorize the C++ precedence rules before starting to use more advanced C++ features that rely on fancy operator usage, else run into a lot of 'fun' things like this. Basically this: start %= (constitkind >> id > ':' > id >> probs) % ","; Is read as this to the C++ parser: start %= (constitkind >> (id > ':' > id) >> probs) % ","; Because greater-then's have a different precedence level then right-shifts.