std::swap(std::unordered_map) (3) - Linux Man Pages

std::swap(std::unordered_map): std::swap(std::unordered_map)

NAME

std::swap(std::unordered_map) - std::swap(std::unordered_map)

Synopsis


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


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