
13 Aug
2007
13 Aug
'07
4:19 p.m.
Although it's legal to overload std::swap for custom types, in my experience it's very uncommon to do so. More importantly than my personal experience though - no boost classes provide a swap function in namespace std.
From a conceptual point of view, a non-member swap function forms part of a classes public interface, so it really belongs in the same namespace.