I think it was DavidP, the method was a^=b^=a^=b; I ran some tests... and in all cases it seems to be slower than a conventional swap.
Originally posted by Shadow12345
This is somewhat off of the topic, but monster (or someone else perhaps?) didn't you come up with a way to swap the values of variables using exclusive or? You should show that to me again, I don't remember exactly how you did that.
a ^= b ^= c or something like that?
How useful is manipulating bits in C++? I haven't come across a time where I've needed to do that. Are there any other major purposes for doing it (other than encrypting messages?)