swap function template — Swaps two strings
template<class charT, class traits, class Allocator> void swap(basic_string<charT,traits,Allocator>& a, basic_string<charT,traits,Allocator>& b); // void swap(string& a, string& b);
The swap
function template
specialization is equivalent to calling a.swap(b)
.