std::swap(std::vector) (3) - Linux Manuals
std::swap(std::vector): std::swap(std::vector)
NAME
std::swap(std::vector) - std::swap(std::vector)
Synopsis
template< class T, class Alloc >
void swap( vector<T,Alloc>& lhs, (until C++17)
vector<T,Alloc>& rhs );
template< class T, class Alloc >
void swap( vector<T,Alloc>& lhs, (since C++17)
vector<T,Alloc>& rhs ) noexcept(/* see below */);
Specializes the std::swap algorithm for std::vector. Swaps the contents of lhs and rhs. Calls lhs.swap(rhs).
Parameters
lhs, rhs - containers whose contents to swap
Return value
(none)
Complexity
Constant.
Exceptions
noexcept specification: (since C++17)
noexcept(noexcept(lhs.swap(rhs)))
See also
swap (public member function)