I've made the copy constructor private in one of my classes and i'm getting a compiler error informing me that std::swap is trying to call the copy constructor.

is there a way to make the std::swap a friend of the class? I couldn't get it to do it.

I tried:
Code:
friend void std::swap( MyClass&, MyClass& )
but gcc tells me swap should've been declared in std.

Any ideas?

BTW: this is the swap in <algorithm> if it makes any difference