std::swap(std::deque) (3) - Linux Manuals

std::swap(std::deque): std::swap(std::deque)

NAME

std::swap(std::deque) - std::swap(std::deque)

Synopsis


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


Specializes the std::swap algorithm for std::deque. 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


     swaps the contents
swap (public member function)