swap function template — Swaps the contents of two lists
template<typename T, typename A> void swap(list<T, A>& x, list<T, A>& y)
The swap function template specialization is equivalent to calling x.swap(y).
swap
x.swap(y)
swap in <algorithm>
<algorithm>