21 Strings library [strings]

21.3 String classes [string.classes]

21.3.2 basic_string non-member functions [string.nonmembers]

21.3.2.8 swap [string.special]

template<class charT, class traits, class Allocator> void swap(basic_string<charT, traits, Allocator>& lhs, basic_string<charT, traits, Allocator>& rhs) noexcept(noexcept(lhs.swap(rhs)));

Effects: Equivalent to: lhs.swap(rhs);