cout << i++ << i--
semantically equivalent
operator<<(operator<<(cout, i++), i--);
<------arg1--------->, <-arg2->
$ 1.9 / 15- "When a function is called (regardless of whether the function is inline), the calculation of each value and the side effect associated with any argument or postfix expression denoting the called function are sequenced before each expression is executed or in the body of the called function. [ Note: value calculations and side effects associated with different unexpanded argument expressions. -End note ]
C ++ 0x:
, arg1/arg2 ( ).
:
, undefined.
operator<<(operator<<(cout, i++), i--);
^ the interesting sequence point is right here
, arg1, arg2 i, , , .
undefined. , ?
"undefined " :) .
undefined , ( ), ( ). undefined; O .
@DarkDust ' : -)'
, , , undefined.
.
, defined , , OP, ( ):)