19) In a shift operator expression E1<<E2 and E1>>E2, every value computation and side-effect of E1 is sequenced before every value computation and side effect of E2 http://en.cppreference.com/w/cpp/language/eval_order
Side note: I think this is the perfect case study of why abusing operators is a Bad Idea.
First, we overload shift operators to do something magical.
Then we discover that the new shift-operator idiom is understood differently than every other operator, causing confusion with users.
Now, since the operator re-purposing is a major part of the language, we must go back and add special constraints to the operator -- not to fix the operator’s function, but to fix the commonly perceived use-case of that operator.
LOL.
You are not guaranteed any evaluation order for operands for any operators (except && and ||, to support their magical unoverloaded short-circuit behavior). The only guarantee is that both operands be evaluated before the operator is applied.