The order of evaluation of function arguments is unsequenced (until C++17).
From ISO/IEC 14882:2011 (C++11) ยง1.9.15, p.11
"Except where noted, evaluations of operands of individual operators and of subexpressions of individual expressions are unsequenced."
And
"If a side effect on a scalar object is unsequenced relative to either another side effect on the same scalar object or a value computation using the value of the same scalar object, the behavior is undefined."
So in terms of standard C++, the behavior is undefined.