I think, the assignment operators like =
, +=
... don't guarantee the order of evaluation of their operands, So It is usually Undefined Behavior to modify the same object in the same expression whose operator doesn't guarantee the order of evaluation of its operands.
My problem is why then I use this in my programs and in many examples:
int x = 0; x = x + 1;
So is it UB in the assignment expression above?