Compiling with msvc, right?
You don't get any error because the compiler uses this function instead, defined in include/utility.

Qt Code:
  1. template<class _Ty> inline
  2. void swap(_Ty& _Left, _Ty& _Right)
  3. { // exchange values stored at _Left and _Right
  4. if (&_Left != &_Right)
  5. { // different, worth swapping
  6. _Ty _Tmp = _Left;
  7.  
  8. _Left = _Right;
  9. _Right = _Tmp;
  10. }
  11. }
To copy to clipboard, switch view to plain text mode 

Rename your function and you'll see the errors.