Files
2025-10-25 03:02:53 +03:00

2.5 KiB

[unord.set.syn]

23 Containers library [containers]

23.5 Unordered associative containers [unord]

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

🔗

#include // see [compare.syn]#include <initializer_list> // see [initializer.list.syn]namespace std {// [unord.set], class template unordered_settemplate<class Key, class Hash = hash, class Pred = equal_to, class Alloc = allocator>class unordered_set; // [unord.multiset], class template unordered_multisettemplate<class Key, class Hash = hash, class Pred = equal_to, class Alloc = allocator>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], 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], 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, class Pred = equal_to>using unordered_set = std::unordered_set<Key, Hash, Pred, polymorphic_allocator>; template<class Key, class Hash = hash, class Pred = equal_to>using unordered_multiset = std::unordered_multiset<Key, Hash, Pred, polymorphic_allocator>; }}