std::swap(std::list)

std::swap(std::list)

template< class T, class Alloc >
void swap( list<T,Alloc>& lhs, 
           list<T,Alloc>& rhs );
(until C++17)
template< class T, class Alloc >
void swap( list<T,Alloc>& lhs, 
           list<T,Alloc>& rhs ) noexcept(/* see below */);
(since C++17)

Specializes the std::swap algorithm for std::登录查看完整内容