— As far as I understand, its not guaranteed here that a+b or a=b will be calculated first (at least before C++17). So this expression not guaranteed to work the same on all the compilers. https://en.cppreference.com/w/cpp/language/eval_order
In this case we can parse the expression as a tree (picture below), it's evaluated from top to bottom. We can't evaluate minus before we evaluate both a+b and a=b, but as far as I know the order of these two can be any.
— I can be wrong, though. But I don't see any guarantees about operators specifically. Also check out this https://stackoverflow.com/questions/1826159/swapping-two-variable-value-without-using-third-variable