This little one liner is cute and all, but it is unreadable. So if you use it, you need to add a couple lines of comments saying what it does (not just "swap integers" as that will be assumed to be an out of date comment) which makes the effort of programming greater than using a temp variable.
So what good is it? Well, if you REALLY needed the speed or space, I suppose it might be good. Have you measured the size of the generated code for this vs. a more conventional method? Does is actually save anything? How about speed? How much does it save?
And when you use something like this, are you optimizing on general principles or because you have measured and determined that this place is where all your CPU is going?
The order of evaluation is unspecified, so there is no guarantee that the evaluation will happen left-to-right. It just may happen to work on your particular compiler.
See the Expressions[^] section of the C FAQ[^] (which also applies to C++ in these kinds of situations).
Also, main()always returns int (not void) in a conformant program.
A previous poster says it doesn't work, and I think it's because the value of the first occurrence of 'i' is not guaranteed to be evaluated before the assignment subexpression.