[unord.set.syn]

# 23 Containers library [[containers]](./#containers)

## 23.5 Unordered associative containers [[unord]](unord#set.syn)

### 23.5.5 Header <unordered_set> synopsis [unord.set.syn]

[ð](#header:%3cunordered_set%3e)

#include <compare> // see [[compare.syn]](compare.syn "17.12.1 Header <compare> synopsis")#include <initializer_list> // see [[initializer.list.syn]](initializer.list.syn "17.11.2 Header <initializer_­list> synopsis")namespace std {// [[unord.set]](unord.set "23.5.6 Class template unordered_­set"), class template unordered_settemplate<class Key, class Hash = hash<Key>, class Pred = equal_to<Key>, class Alloc = allocator<Key>>class unordered_set; // [[unord.multiset]](unord.multiset "23.5.7 Class template unordered_­multiset"), class template unordered_multisettemplate<class Key, class Hash = hash<Key>, class Pred = equal_to<Key>, class Alloc = allocator<Key>>class unordered_multiset; template<class Key, class Hash, class Pred, class Alloc>constexpr bool operator==(const unordered_set<Key, Hash, Pred, Alloc>& a, const unordered_set<Key, Hash, Pred, Alloc>& b); template<class Key, class Hash, class Pred, class Alloc>constexpr bool operator==(const unordered_multiset<Key, Hash, Pred, Alloc>& a, const unordered_multiset<Key, Hash, Pred, Alloc>& b); template<class Key, class Hash, class Pred, class Alloc>constexpr void swap(unordered_set<Key, Hash, Pred, Alloc>& x,
 unordered_set<Key, Hash, Pred, Alloc>& y)noexcept(noexcept(x.swap(y))); template<class Key, class Hash, class Pred, class Alloc>constexpr void swap(unordered_multiset<Key, Hash, Pred, Alloc>& x,
 unordered_multiset<Key, Hash, Pred, Alloc>& y)noexcept(noexcept(x.swap(y))); // [[unord.set.erasure]](unord.set.erasure "23.5.6.3 Erasure"), erasure for unordered_settemplate<class K, class H, class P, class A, class Predicate>constexpr typename unordered_set<K, H, P, A>::size_type
 erase_if(unordered_set<K, H, P, A>& c, Predicate pred); // [[unord.multiset.erasure]](unord.multiset.erasure "23.5.7.3 Erasure"), erasure for unordered_multisettemplate<class K, class H, class P, class A, class Predicate>constexpr typename unordered_multiset<K, H, P, A>::size_type
 erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred); namespace pmr {template<class Key, class Hash = hash<Key>, class Pred = equal_to<Key>>using unordered_set = std::unordered_set<Key, Hash, Pred,
 polymorphic_allocator<Key>>; template<class Key, class Hash = hash<Key>, class Pred = equal_to<Key>>using unordered_multiset = std::unordered_multiset<Key, Hash, Pred,
 polymorphic_allocator<Key>>; }}
