24 Strings library [strings]

24.3 String classes [string.classes]

24.3.3 basic_­string non-member functions [string.nonmembers]

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