swap

template<class T, class A>
    void swap(
        const basic_string<E, T, A>& lhs,
        const basic_string<E, T, A>& rhs);

The template function executes swap(lhs, rhs).