This non member swap exchanges the first and second arguments.
template <class charT, class traits, class Allocator> void swap (basic_string<charT,traits,Allocator>& lhs, basic_string <charT,traits,Allocator>& rhs);