swap

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

The template function executes lhs.swap(rhs).