you can swap 2 numbers with just xor also. Its an old interview/test/useless knowledge question (its very inefficient). If you want to swap 2 things without a temporary, use the system stack or registers if you are really, really that deep into performance. Most of the time, the temporary is readable, portable, and more than fine.
It does math AND copies. It does just as many assignments as the temp version, with added xor process. The temp variable costs less than the extra work, in every test I ever did.
Standard swap is coded to do it right for your data types... use that generally.