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

std::swap(std::unordered_set): std::swap(std::unordered_set)

NAME

std::swap(std::unordered_set) - std::swap(std::unordered_set)

Synopsis


template< class Key, class Hash, class KeyEqual, class Alloc > (since C++11)
void swap( unordered_set<Key,Hash,KeyEqual,Alloc>& lhs, (until C++17)
unordered_set<Key,Hash,KeyEqual,Alloc>& rhs );
template< class Key, class Hash, class KeyEqual, class Alloc >
void swap( unordered_set<Key,Hash,KeyEqual,Alloc>& lhs, (since C++17)
unordered_set<Key,Hash,KeyEqual,Alloc>& rhs ) noexcept(/* see below */);


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