Quote Originally Posted by colt
The only thing I was calling, was #include <iostream>
However, that header could indirectly include a header that defines std::swap.

Quote Originally Posted by colt
But it is not bad for the performance if the type is of something "big"
The problem is that it is simply incorrect if you're trying to implement a swap. If you make tmp a reference and initialise it to refer to arg1 instead of making it a copy of arg1, then when you assign arg2 to arg1, tmp will also be changed (since it is an alias), so when you assign tmp to arg2, it will have no net effect: you're just assigning a copy of arg2 to arg2, so what you end up with is both arg1 and arg2 having the original value of arg2. That's not a swap.

You should be aware that since the advent of C++11, a generic swap like this (including std::swap) is likely to be implemented using move semantics:
Code:
T tmp = std::move(arg1);
arg1 = std::move(arg2);
arg2 = std::move(tmp);
If moving is more efficient than copying for type T, this would then address the performance issue that you mentioned.