SysTutorials

Linux Manual Pages › Section 3

stdswapstdunordered_multiset(3)

std::swap(std::unordered_multiset) - std::swap(std::unordered_multiset)

Synopsis

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

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