Addition assignment += behavior in expression
Recently I came across this question: Assignment operator chain understanding . While answering this question I started doubting my own understanding of the behavior of the addition assignment operator += or any other operator= ( &= , *= , /= , etc.). My question is, when is the variable a in the expressions below updated in place, so that its changed value is reflected in other places in the expression during evaluation, and what is the logic behind it? Please take a look at following two expressions: Expression 1 a = 1 b = (a += (a += a)) //b = 3 is the result, but if a were updated in place