(and anything that supports a bit-wise XOR operation).
Duoas is answering the question based on the fact that your swap() function takes two ints,
rather than being a template that can take any arbitrary type. If you make it a template,
then your swap works for any type that supports a bit-wise XOR operation. If you don't,
then you have to cast the types to int first, then call the function, at which point Duoas'
answer applies.