30 #ifndef _UNORDERED_SET_H 31 #define _UNORDERED_SET_H 33 namespace std _GLIBCXX_VISIBILITY(default)
35 _GLIBCXX_BEGIN_NAMESPACE_VERSION
36 _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
42 template<
typename _Value,
48 __detail::_Identity, _Pred, _Hash,
57 template<
typename _Value,
65 __detail::_Mod_range_hashing,
66 __detail::_Default_ranged_hash,
67 __detail::_Prime_rehash_policy, _Tr>;
69 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
93 template<
typename _Value,
108 typedef typename _Hashtable::hasher
hasher;
127 #if __cplusplus > 201402L 128 using node_type =
typename _Hashtable::node_type;
129 using insert_return_type =
typename _Hashtable::insert_return_type;
146 const hasher& __hf =
hasher(),
149 : _M_h(__n, __hf, __eql, __a)
165 template<
typename _InputIterator>
168 const hasher& __hf =
hasher(),
171 : _M_h(__first, __last, __n, __hf, __eql, __a)
195 const allocator_type& __a)
196 : _M_h(__uset._M_h, __a)
205 const allocator_type& __a)
206 : _M_h(std::move(__uset._M_h), __a)
222 const hasher& __hf =
hasher(),
225 : _M_h(__l, __n, __hf, __eql, __a)
233 const allocator_type& __a)
237 template<
typename _InputIterator>
240 const allocator_type& __a)
244 template<
typename _InputIterator>
246 size_type __n,
const hasher& __hf,
247 const allocator_type& __a)
253 const allocator_type& __a)
258 size_type __n,
const hasher& __hf,
259 const allocator_type& __a)
292 {
return _M_h.get_allocator(); }
299 {
return _M_h.empty(); }
304 {
return _M_h.size(); }
309 {
return _M_h.max_size(); }
320 {
return _M_h.begin(); }
324 {
return _M_h.begin(); }
334 {
return _M_h.end(); }
338 {
return _M_h.end(); }
347 {
return _M_h.begin(); }
355 {
return _M_h.end(); }
374 template<
typename... _Args>
377 {
return _M_h.emplace(std::forward<_Args>(__args)...); }
400 template<
typename... _Args>
403 {
return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
421 {
return _M_h.insert(__x); }
425 {
return _M_h.insert(std::move(__x)); }
449 insert(const_iterator __hint,
const value_type& __x)
450 {
return _M_h.insert(__hint, __x); }
453 insert(const_iterator __hint, value_type&& __x)
454 {
return _M_h.insert(__hint, std::move(__x)); }
466 template<
typename _InputIterator>
468 insert(_InputIterator __first, _InputIterator __last)
469 { _M_h.insert(__first, __last); }
480 { _M_h.insert(__l); }
482 #if __cplusplus > 201402L 485 extract(const_iterator __pos)
487 __glibcxx_assert(__pos !=
end());
488 return _M_h.extract(__pos);
493 extract(
const key_type& __key)
494 {
return _M_h.extract(__key); }
499 {
return _M_h._M_reinsert_node(std::move(__nh)); }
503 insert(const_iterator, node_type&& __nh)
504 {
return _M_h._M_reinsert_node(std::move(__nh)).position; }
523 {
return _M_h.erase(__position); }
528 {
return _M_h.erase(__position); }
545 {
return _M_h.erase(__x); }
562 erase(const_iterator __first, const_iterator __last)
563 {
return _M_h.erase(__first, __last); }
586 noexcept( noexcept(_M_h.swap(__x._M_h)) )
587 { _M_h.swap(__x._M_h); }
589 #if __cplusplus > 201402L 590 template<
typename,
typename,
typename>
591 friend class std::_Hash_merge_helper;
593 template<
typename _H2,
typename _P2>
597 using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>;
598 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
601 template<
typename _H2,
typename _P2>
606 template<
typename _H2,
typename _P2>
610 using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>;
611 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
614 template<
typename _H2,
typename _P2>
626 {
return _M_h.hash_function(); }
632 {
return _M_h.key_eq(); }
650 {
return _M_h.find(__x); }
653 find(
const key_type& __x)
const 654 {
return _M_h.find(__x); }
668 {
return _M_h.count(__x); }
681 {
return _M_h.equal_range(__x); }
685 {
return _M_h.equal_range(__x); }
693 {
return _M_h.bucket_count(); }
698 {
return _M_h.max_bucket_count(); }
706 bucket_size(size_type __n)
const 707 {
return _M_h.bucket_size(__n); }
715 bucket(
const key_type& __key)
const 716 {
return _M_h.bucket(__key); }
727 {
return _M_h.begin(__n); }
731 {
return _M_h.begin(__n); }
735 {
return _M_h.cbegin(__n); }
747 {
return _M_h.end(__n); }
751 {
return _M_h.end(__n); }
755 {
return _M_h.cend(__n); }
763 {
return _M_h.load_factor(); }
769 {
return _M_h.max_load_factor(); }
777 { _M_h.max_load_factor(__z); }
788 { _M_h.rehash(__n); }
799 { _M_h.reserve(__n); }
801 template<
typename _Value1,
typename _Hash1,
typename _Pred1,
808 #if __cpp_deduction_guides >= 201606 810 template<
typename _InputIterator,
815 typename _Allocator =
817 typename = _RequireInputIter<_InputIterator>,
818 typename = _RequireAllocator<_Allocator>>
821 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
822 ->
unordered_set<
typename iterator_traits<_InputIterator>::value_type,
823 _Hash, _Pred, _Allocator>;
825 template<
typename _Tp,
typename _Hash = hash<_Tp>,
826 typename _Pred = equal_to<_Tp>,
827 typename _Allocator = allocator<_Tp>,
828 typename = _RequireAllocator<_Allocator>>
831 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
834 template<
typename _InputIterator,
typename _Allocator,
835 typename = _RequireInputIter<_InputIterator>,
836 typename = _RequireAllocator<_Allocator>>
841 typename iterator_traits<_InputIterator>::value_type>,
843 typename iterator_traits<_InputIterator>::value_type>,
846 template<
typename _InputIterator,
typename _Hash,
typename _Allocator,
847 typename = _RequireInputIter<_InputIterator>,
848 typename = _RequireAllocator<_Allocator>>
855 typename iterator_traits<_InputIterator>::value_type>,
858 template<
typename _Tp,
typename _Allocator,
859 typename = _RequireAllocator<_Allocator>>
864 template<
typename _Tp,
typename _Hash,
typename _Allocator,
865 typename = _RequireAllocator<_Allocator>>
891 template<
typename _Value,
906 typedef typename _Hashtable::hasher
hasher;
925 #if __cplusplus > 201402L 926 using node_type =
typename _Hashtable::node_type;
943 const hasher& __hf =
hasher(),
946 : _M_h(__n, __hf, __eql, __a)
962 template<
typename _InputIterator>
965 const hasher& __hf =
hasher(),
968 : _M_h(__first, __last, __n, __hf, __eql, __a)
990 const hasher& __hf =
hasher(),
993 : _M_h(__l, __n, __hf, __eql, __a)
1019 const allocator_type& __a)
1020 : _M_h(__umset._M_h, __a)
1029 const allocator_type& __a)
1030 : _M_h(std::move(__umset._M_h), __a)
1038 const allocator_type& __a)
1042 template<
typename _InputIterator>
1045 const allocator_type& __a)
1049 template<
typename _InputIterator>
1051 size_type __n,
const hasher& __hf,
1052 const allocator_type& __a)
1058 const allocator_type& __a)
1063 size_type __n,
const hasher& __hf,
1064 const allocator_type& __a)
1089 {
return _M_h.get_allocator(); }
1096 {
return _M_h.empty(); }
1101 {
return _M_h.size(); }
1106 {
return _M_h.max_size(); }
1117 {
return _M_h.begin(); }
1121 {
return _M_h.begin(); }
1131 {
return _M_h.end(); }
1135 {
return _M_h.end(); }
1144 {
return _M_h.begin(); }
1152 {
return _M_h.end(); }
1163 template<
typename... _Args>
1166 {
return _M_h.emplace(std::forward<_Args>(__args)...); }
1185 template<
typename... _Args>
1188 {
return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
1200 {
return _M_h.insert(__x); }
1204 {
return _M_h.insert(std::move(__x)); }
1225 insert(const_iterator __hint,
const value_type& __x)
1226 {
return _M_h.insert(__hint, __x); }
1229 insert(const_iterator __hint, value_type&& __x)
1230 {
return _M_h.insert(__hint, std::move(__x)); }
1241 template<
typename _InputIterator>
1243 insert(_InputIterator __first, _InputIterator __last)
1244 { _M_h.insert(__first, __last); }
1255 { _M_h.insert(__l); }
1257 #if __cplusplus > 201402L 1260 extract(const_iterator __pos)
1262 __glibcxx_assert(__pos !=
end());
1263 return _M_h.extract(__pos);
1268 extract(
const key_type& __key)
1269 {
return _M_h.extract(__key); }
1274 {
return _M_h._M_reinsert_node_multi(
cend(), std::move(__nh)); }
1278 insert(const_iterator __hint, node_type&& __nh)
1279 {
return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
1299 {
return _M_h.erase(__position); }
1304 {
return _M_h.erase(__position); }
1322 {
return _M_h.erase(__x); }
1341 erase(const_iterator __first, const_iterator __last)
1342 {
return _M_h.erase(__first, __last); }
1366 noexcept( noexcept(_M_h.swap(__x._M_h)) )
1367 { _M_h.swap(__x._M_h); }
1369 #if __cplusplus > 201402L 1370 template<
typename,
typename,
typename>
1371 friend class std::_Hash_merge_helper;
1373 template<
typename _H2,
typename _P2>
1378 = _Hash_merge_helper<unordered_multiset, _H2, _P2>;
1379 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
1382 template<
typename _H2,
typename _P2>
1385 { merge(__source); }
1387 template<
typename _H2,
typename _P2>
1392 = _Hash_merge_helper<unordered_multiset, _H2, _P2>;
1393 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
1396 template<
typename _H2,
typename _P2>
1399 { merge(__source); }
1408 {
return _M_h.hash_function(); }
1414 {
return _M_h.key_eq(); }
1432 {
return _M_h.find(__x); }
1436 {
return _M_h.find(__x); }
1446 {
return _M_h.count(__x); }
1457 {
return _M_h.equal_range(__x); }
1461 {
return _M_h.equal_range(__x); }
1469 {
return _M_h.bucket_count(); }
1474 {
return _M_h.max_bucket_count(); }
1482 bucket_size(size_type __n)
const 1483 {
return _M_h.bucket_size(__n); }
1491 bucket(
const key_type& __key)
const 1492 {
return _M_h.bucket(__key); }
1503 {
return _M_h.begin(__n); }
1505 const_local_iterator
1507 {
return _M_h.begin(__n); }
1509 const_local_iterator
1511 {
return _M_h.cbegin(__n); }
1523 {
return _M_h.end(__n); }
1525 const_local_iterator
1527 {
return _M_h.end(__n); }
1529 const_local_iterator
1531 {
return _M_h.cend(__n); }
1539 {
return _M_h.load_factor(); }
1545 {
return _M_h.max_load_factor(); }
1553 { _M_h.max_load_factor(__z); }
1564 { _M_h.rehash(__n); }
1575 { _M_h.reserve(__n); }
1577 template<
typename _Value1,
typename _Hash1,
typename _Pred1,
1585 #if __cpp_deduction_guides >= 201606 1587 template<
typename _InputIterator,
1592 typename _Allocator =
1594 typename = _RequireInputIter<_InputIterator>,
1595 typename = _RequireAllocator<_Allocator>>
1598 _Hash = _Hash(), _Pred = _Pred(),
1599 _Allocator = _Allocator())
1601 _Hash, _Pred, _Allocator>;
1603 template<
typename _Tp,
typename _Hash = hash<_Tp>,
1604 typename _Pred = equal_to<_Tp>,
1605 typename _Allocator = allocator<_Tp>,
1606 typename = _RequireAllocator<_Allocator>>
1609 _Hash = _Hash(), _Pred = _Pred(),
1610 _Allocator = _Allocator())
1613 template<
typename _InputIterator,
typename _Allocator,
1614 typename = _RequireInputIter<_InputIterator>,
1615 typename = _RequireAllocator<_Allocator>>
1620 iterator_traits<_InputIterator>::value_type>,
1622 iterator_traits<_InputIterator>::value_type>,
1625 template<
typename _InputIterator,
typename _Hash,
typename _Allocator,
1626 typename = _RequireInputIter<_InputIterator>,
1627 typename = _RequireAllocator<_Allocator>>
1632 iterator_traits<_InputIterator>::value_type,
1636 iterator_traits<_InputIterator>::value_type>,
1639 template<
typename _Tp,
typename _Allocator,
1640 typename = _RequireAllocator<_Allocator>>
1645 template<
typename _Tp,
typename _Hash,
typename _Allocator,
1646 typename = _RequireAllocator<_Allocator>>
1653 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1657 noexcept(noexcept(__x.
swap(__y)))
1660 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1664 noexcept(noexcept(__x.
swap(__y)))
1667 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1671 {
return __x._M_h._M_equal(__y._M_h); }
1673 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1677 {
return !(__x == __y); }
1679 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1683 {
return __x._M_h._M_equal(__y._M_h); }
1685 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1689 {
return !(__x == __y); }
1691 _GLIBCXX_END_NAMESPACE_CONTAINER
1693 #if __cplusplus > 201402L 1695 template<
typename _Val,
typename _Hash1,
typename _Eq1,
typename _Alloc,
1696 typename _Hash2,
typename _Eq2>
1697 struct _Hash_merge_helper<
1698 _GLIBCXX_STD_C::
unordered_set<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2>
1701 template<
typename... _Tp>
1702 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>;
1703 template<
typename... _Tp>
1710 {
return __set._M_h; }
1714 {
return __set._M_h; }
1718 template<
typename _Val,
typename _Hash1,
typename _Eq1,
typename _Alloc,
1719 typename _Hash2,
typename _Eq2>
1720 struct _Hash_merge_helper<
1725 template<
typename... _Tp>
1726 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>;
1727 template<
typename... _Tp>
1734 {
return __set._M_h; }
1738 {
return __set._M_h; }
1742 _GLIBCXX_END_NAMESPACE_VERSION
void swap(unordered_multiset &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_multiset.
void swap(unordered_set &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_set.
size_type count(const key_type &__x) const
Finds the number of elements.
void max_load_factor(float __z)
Change the unordered_multiset maximum load factor.
unordered_set(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_set.
bool empty() const noexcept
Returns true if the unordered_multiset is empty.
local_iterator begin(size_type __n)
Returns a read-only (constant) iterator pointing to the first bucket element.
void reserve(size_type __n)
Prepare the unordered_set for a specified number of elements.
size_type size() const noexcept
Returns the size of the unordered_set.
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
const_iterator end() const noexcept
const_iterator begin() const noexcept
unordered_set()=default
Default constructor.
Struct holding two objects of arbitrary type.
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
hasher hash_function() const
Returns the hash functor object with which the unordered_set was constructed.
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
_Hashtable::key_equal key_equal
Public typedefs.
const_iterator cbegin() const noexcept
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_multiset.
const_iterator end() const noexcept
Default range hashing function: use division to fold a large number into the range [0...
iterator find(const key_type &__x)
Tries to locate an element in an unordered_set.
_Hashtable::allocator_type allocator_type
Public typedefs.
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
size_type max_size() const noexcept
Returns the maximum size of the unordered_set.
float max_load_factor() const noexcept
Returns a positive number that the unordered_set tries to keep the load factor less than or equal to...
size_type size() const noexcept
Returns the size of the unordered_multiset.
hasher hash_function() const
Returns the hash functor object with which the unordered_multiset was constructed.
The standard allocator, as per [20.4].
_Hashtable::difference_type difference_type
Iterator-related typedefs.
iterator erase(const_iterator __position)
Erases an element from an unordered_multiset.
ISO C++ entities toplevel namespace is std.
unordered_multiset(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multiset from a range.
_Hashtable::iterator iterator
Iterator-related typedefs.
const_iterator cbegin() const noexcept
iterator find(const key_type &__x)
Tries to locate an element in an unordered_multiset.
iterator begin() noexcept
A standard container composed of equivalent keys (possibly containing multiple of each key value) in ...
local_iterator end(size_type __n)
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
_Hashtable::size_type size_type
Iterator-related typedefs.
void rehash(size_type __n)
May rehash the unordered_set.
unordered_set(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_set from a range.
unordered_set(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_set from an initializer_list.
_Hashtable::reference reference
Iterator-related typedefs.
iterator erase(const_iterator __position)
Erases an element from an unordered_set.
unordered_set & operator=(initializer_list< value_type > __l)
Unordered_set list assignment operator.
iterator insert(const_iterator __hint, value_type &&__x)
Inserts an element into the unordered_multiset.
iterator emplace_hint(const_iterator __pos, _Args &&...__args)
Inserts an element into the unordered_multiset.
_Hashtable::pointer pointer
Iterator-related typedefs.
float load_factor() const noexcept
Returns the average number of elements per bucket.
Primary class template hash.
unordered_multiset(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
_Hashtable::const_reference const_reference
Iterator-related typedefs.
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
_Hashtable::iterator iterator
Iterator-related typedefs.
void insert(_InputIterator __first, _InputIterator __last)
A template function that inserts a range of elements.
key_equal key_eq() const
Returns the key comparison object with which the unordered_set was constructed.
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
iterator emplace_hint(const_iterator __pos, _Args &&...__args)
Attempts to insert an element into the unordered_set.
_Hashtable::allocator_type allocator_type
Public typedefs.
_Hashtable::hasher hasher
Public typedefs.
_Hashtable::key_type key_type
Public typedefs.
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_multiset.
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
unordered_set & operator=(const unordered_set &)=default
Copy assignment operator.
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_set.
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
iterator insert(const value_type &__x)
Inserts an element into the unordered_multiset.
iterator insert(const_iterator __hint, value_type &&__x)
Attempts to insert an element into the unordered_set.
One of the comparison functors.
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
unordered_multiset(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multiset from an initializer_list.
_Hashtable::size_type size_type
Iterator-related typedefs.
_Hashtable::reference reference
Iterator-related typedefs.
float load_factor() const noexcept
Returns the average number of elements per bucket.
_Hashtable::difference_type difference_type
Iterator-related typedefs.
bool empty() const noexcept
Returns true if the unordered_set is empty.
std::pair< iterator, bool > emplace(_Args &&...__args)
Attempts to build and insert an element into the unordered_set.
std::pair< iterator, bool > insert(const value_type &__x)
Attempts to insert an element into the unordered_set.
size_type erase(const key_type &__x)
Erases elements according to the provided key.
_Hashtable::key_type key_type
Public typedefs.
_Hashtable::const_reference const_reference
Iterator-related typedefs.
const_iterator begin() const noexcept
_Hashtable::value_type value_type
Public typedefs.
_Hashtable::key_equal key_equal
Public typedefs.
void insert(initializer_list< value_type > __l)
Inserts a list of elements into the unordered_multiset.
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_set.
iterator insert(value_type &&__x)
Inserts an element into the unordered_multiset.
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_multiset.
unordered_set(const allocator_type &__a)
Creates an unordered_set with no elements.
void max_load_factor(float __z)
Change the unordered_set maximum load factor.
size_type erase(const key_type &__x)
Erases elements according to the provided key.
local_iterator begin(size_type __n)
Returns a read-only (constant) iterator pointing to the first bucket element.
iterator begin() noexcept
unordered_multiset(const allocator_type &__a)
Creates an unordered_multiset with no elements.
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_set.
iterator emplace(_Args &&...__args)
Builds and insert an element into the unordered_multiset.
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_set.
void reserve(size_type __n)
Prepare the unordered_multiset for a specified number of elements.
size_type max_size() const noexcept
Returns the maximum size of the unordered_multiset.
iterator insert(const_iterator __hint, const value_type &__x)
Inserts an element into the unordered_multiset.
unordered_multiset & operator=(initializer_list< value_type > __l)
Unordered_multiset list assignment operator.
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
iterator erase(iterator __position)
Erases an element from an unordered_multiset.
std::pair< iterator, bool > insert(value_type &&__x)
Attempts to insert an element into the unordered_set.
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_multiset.
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
_Hashtable::value_type value_type
Public typedefs.
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_set.
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
_Hashtable::hasher hasher
Public typedefs.
iterator insert(const_iterator __hint, const value_type &__x)
Attempts to insert an element into the unordered_set.
const_iterator cend() const noexcept
Default value for rehash policy. Bucket size is (usually) the smallest prime that keeps the load fact...
Default ranged hash function H. In principle it should be a function object composed from objects of ...
iterator erase(iterator __position)
Erases an element from an unordered_set.
size_type count(const key_type &__x) const
Finds the number of elements.
local_iterator end(size_type __n)
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
A standard container composed of unique keys (containing at most one of each key value) in which the ...
float max_load_factor() const noexcept
Returns a positive number that the unordered_multiset tries to keep the load factor less than or equa...
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
void rehash(size_type __n)
May rehash the unordered_multiset.
const_iterator cend() const noexcept
key_equal key_eq() const
Returns the key comparison object with which the unordered_multiset was constructed.
_Hashtable::pointer pointer
Iterator-related typedefs.
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_multiset.