Name

swap function template — Swaps two strings

Synopsis

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).