30#ifndef _UNORDERED_SET_H
31#define _UNORDERED_SET_H
33namespace std _GLIBCXX_VISIBILITY(default)
35_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
41 template<
typename _Value,
47 __detail::_Identity, _Pred, _Hash,
56 template<
typename _Value,
68 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
92 template<
class _Value,
106 typedef typename _Hashtable::value_type value_type;
107 typedef typename _Hashtable::hasher hasher;
108 typedef typename _Hashtable::key_equal key_equal;
109 typedef typename _Hashtable::allocator_type allocator_type;
115 typedef typename _Hashtable::const_pointer const_pointer;
116 typedef typename _Hashtable::reference reference;
117 typedef typename _Hashtable::const_reference const_reference;
118 typedef typename _Hashtable::iterator iterator;
119 typedef typename _Hashtable::const_iterator const_iterator;
120 typedef typename _Hashtable::local_iterator local_iterator;
121 typedef typename _Hashtable::const_local_iterator const_local_iterator;
122 typedef typename _Hashtable::size_type size_type;
123 typedef typename _Hashtable::difference_type difference_type;
126#if __cplusplus > 201402L
127 using node_type =
typename _Hashtable::node_type;
128 using insert_return_type =
typename _Hashtable::insert_return_type;
145 const hasher& __hf = hasher(),
146 const key_equal& __eql = key_equal(),
147 const allocator_type& __a = allocator_type())
148 : _M_h(__n, __hf, __eql, __a)
164 template<
typename _InputIterator>
167 const hasher& __hf = hasher(),
168 const key_equal& __eql = key_equal(),
169 const allocator_type& __a = allocator_type())
170 : _M_h(__first, __last, __n, __hf, __eql, __a)
194 const allocator_type& __a)
195 : _M_h(__uset._M_h, __a)
204 const allocator_type& __a)
205 : _M_h(
std::move(__uset._M_h), __a)
221 const hasher& __hf = hasher(),
222 const key_equal& __eql = key_equal(),
223 const allocator_type& __a = allocator_type())
224 : _M_h(__l, __n, __hf, __eql, __a)
232 const allocator_type& __a)
236 template<
typename _InputIterator>
239 const allocator_type& __a)
240 :
unordered_set(__first, __last, __n, hasher(), key_equal(), __a)
243 template<
typename _InputIterator>
245 size_type __n,
const hasher& __hf,
246 const allocator_type& __a)
247 :
unordered_set(__first, __last, __n, __hf, key_equal(), __a)
252 const allocator_type& __a)
257 size_type __n,
const hasher& __hf,
258 const allocator_type& __a)
291 {
return _M_h.get_allocator(); }
298 {
return _M_h.empty(); }
303 {
return _M_h.size(); }
308 {
return _M_h.max_size(); }
319 {
return _M_h.begin(); }
322 begin() const noexcept
323 {
return _M_h.begin(); }
333 {
return _M_h.end(); }
337 {
return _M_h.end(); }
346 {
return _M_h.begin(); }
354 {
return _M_h.end(); }
373 template<
typename... _Args>
376 {
return _M_h.emplace(std::forward<_Args>(__args)...); }
399 template<
typename... _Args>
402 {
return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
420 {
return _M_h.insert(__x); }
424 {
return _M_h.insert(std::move(__x)); }
448 insert(const_iterator __hint,
const value_type& __x)
449 {
return _M_h.insert(__hint, __x); }
452 insert(const_iterator __hint, value_type&& __x)
453 {
return _M_h.insert(__hint, std::move(__x)); }
465 template<
typename _InputIterator>
467 insert(_InputIterator __first, _InputIterator __last)
468 { _M_h.insert(__first, __last); }
479 { _M_h.insert(__l); }
481#if __cplusplus > 201402L
484 extract(const_iterator __pos)
486 __glibcxx_assert(__pos !=
end());
487 return _M_h.extract(__pos);
493 {
return _M_h.extract(__key); }
498 {
return _M_h._M_reinsert_node(std::move(__nh)); }
502 insert(const_iterator, node_type&& __nh)
503 {
return _M_h._M_reinsert_node(std::move(__nh)).position; }
522 {
return _M_h.erase(__position); }
527 {
return _M_h.erase(__position); }
544 {
return _M_h.erase(__x); }
561 erase(const_iterator __first, const_iterator __last)
562 {
return _M_h.erase(__first, __last); }
585 noexcept(
noexcept(_M_h.swap(__x._M_h)) )
586 { _M_h.swap(__x._M_h); }
588#if __cplusplus > 201402L
589 template<
typename,
typename,
typename>
590 friend class _Hash_merge_helper;
592 template<
typename _H2,
typename _P2>
596 using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>;
597 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
600 template<
typename _H2,
typename _P2>
602 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source)
605 template<
typename _H2,
typename _P2>
607 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source)
609 using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>;
610 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
613 template<
typename _H2,
typename _P2>
615 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source)
625 {
return _M_h.hash_function(); }
631 {
return _M_h.key_eq(); }
649 {
return _M_h.find(__x); }
653 {
return _M_h.find(__x); }
667 {
return _M_h.count(__x); }
680 {
return _M_h.equal_range(__x); }
684 {
return _M_h.equal_range(__x); }
692 {
return _M_h.bucket_count(); }
697 {
return _M_h.max_bucket_count(); }
705 bucket_size(size_type __n)
const
706 {
return _M_h.bucket_size(__n); }
715 {
return _M_h.bucket(__key); }
726 {
return _M_h.begin(__n); }
729 begin(size_type __n)
const
730 {
return _M_h.begin(__n); }
733 cbegin(size_type __n)
const
734 {
return _M_h.cbegin(__n); }
746 {
return _M_h.end(__n); }
749 end(size_type __n)
const
750 {
return _M_h.end(__n); }
753 cend(size_type __n)
const
754 {
return _M_h.cend(__n); }
762 {
return _M_h.load_factor(); }
768 {
return _M_h.max_load_factor(); }
776 { _M_h.max_load_factor(__z); }
787 { _M_h.rehash(__n); }
798 { _M_h.reserve(__n); }
800 template<
typename _Value1,
typename _Hash1,
typename _Pred1,
826 template<
class _Value,
827 class _Hash = hash<_Value>,
840 typedef typename _Hashtable::value_type value_type;
841 typedef typename _Hashtable::hasher hasher;
842 typedef typename _Hashtable::key_equal key_equal;
843 typedef typename _Hashtable::allocator_type allocator_type;
849 typedef typename _Hashtable::const_pointer const_pointer;
850 typedef typename _Hashtable::reference reference;
851 typedef typename _Hashtable::const_reference const_reference;
852 typedef typename _Hashtable::iterator iterator;
853 typedef typename _Hashtable::const_iterator const_iterator;
854 typedef typename _Hashtable::local_iterator local_iterator;
855 typedef typename _Hashtable::const_local_iterator const_local_iterator;
856 typedef typename _Hashtable::size_type size_type;
857 typedef typename _Hashtable::difference_type difference_type;
860#if __cplusplus > 201402L
861 using node_type =
typename _Hashtable::node_type;
878 const hasher& __hf = hasher(),
879 const key_equal& __eql = key_equal(),
880 const allocator_type& __a = allocator_type())
881 : _M_h(__n, __hf, __eql, __a)
897 template<
typename _InputIterator>
900 const hasher& __hf = hasher(),
901 const key_equal& __eql = key_equal(),
902 const allocator_type& __a = allocator_type())
903 : _M_h(__first, __last, __n, __hf, __eql, __a)
925 const hasher& __hf = hasher(),
926 const key_equal& __eql = key_equal(),
927 const allocator_type& __a = allocator_type())
928 : _M_h(__l, __n, __hf, __eql, __a)
954 const allocator_type& __a)
955 : _M_h(__umset._M_h, __a)
964 const allocator_type& __a)
965 : _M_h(
std::move(__umset._M_h), __a)
973 const allocator_type& __a)
977 template<
typename _InputIterator>
980 const allocator_type& __a)
984 template<
typename _InputIterator>
986 size_type __n,
const hasher& __hf,
987 const allocator_type& __a)
993 const allocator_type& __a)
998 size_type __n,
const hasher& __hf,
999 const allocator_type& __a)
1024 {
return _M_h.get_allocator(); }
1031 {
return _M_h.empty(); }
1036 {
return _M_h.size(); }
1041 {
return _M_h.max_size(); }
1052 {
return _M_h.begin(); }
1055 begin() const noexcept
1056 {
return _M_h.begin(); }
1066 {
return _M_h.end(); }
1069 end() const noexcept
1070 {
return _M_h.end(); }
1079 {
return _M_h.begin(); }
1087 {
return _M_h.end(); }
1098 template<
typename... _Args>
1101 {
return _M_h.emplace(std::forward<_Args>(__args)...); }
1120 template<
typename... _Args>
1123 {
return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
1135 {
return _M_h.insert(__x); }
1139 {
return _M_h.insert(std::move(__x)); }
1160 insert(const_iterator __hint,
const value_type& __x)
1161 {
return _M_h.insert(__hint, __x); }
1164 insert(const_iterator __hint, value_type&& __x)
1165 {
return _M_h.insert(__hint, std::move(__x)); }
1176 template<
typename _InputIterator>
1178 insert(_InputIterator __first, _InputIterator __last)
1179 { _M_h.insert(__first, __last); }
1190 { _M_h.insert(__l); }
1192#if __cplusplus > 201402L
1195 extract(const_iterator __pos)
1197 __glibcxx_assert(__pos !=
end());
1198 return _M_h.extract(__pos);
1204 {
return _M_h.extract(__key); }
1209 {
return _M_h._M_reinsert_node_multi(
cend(), std::move(__nh)); }
1213 insert(const_iterator __hint, node_type&& __nh)
1214 {
return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
1234 {
return _M_h.erase(__position); }
1239 {
return _M_h.erase(__position); }
1257 {
return _M_h.erase(__x); }
1276 erase(const_iterator __first, const_iterator __last)
1277 {
return _M_h.erase(__first, __last); }
1301 noexcept(
noexcept(_M_h.swap(__x._M_h)) )
1302 { _M_h.swap(__x._M_h); }
1304#if __cplusplus > 201402L
1305 template<
typename,
typename,
typename>
1306 friend class _Hash_merge_helper;
1308 template<
typename _H2,
typename _P2>
1313 = _Hash_merge_helper<unordered_multiset, _H2, _P2>;
1314 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
1317 template<
typename _H2,
typename _P2>
1319 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source)
1320 { merge(__source); }
1322 template<
typename _H2,
typename _P2>
1324 merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source)
1327 = _Hash_merge_helper<unordered_multiset, _H2, _P2>;
1328 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
1331 template<
typename _H2,
typename _P2>
1333 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source)
1334 { merge(__source); }
1343 {
return _M_h.hash_function(); }
1349 {
return _M_h.key_eq(); }
1367 {
return _M_h.find(__x); }
1371 {
return _M_h.find(__x); }
1381 {
return _M_h.count(__x); }
1392 {
return _M_h.equal_range(__x); }
1396 {
return _M_h.equal_range(__x); }
1404 {
return _M_h.bucket_count(); }
1409 {
return _M_h.max_bucket_count(); }
1417 bucket_size(size_type __n)
const
1418 {
return _M_h.bucket_size(__n); }
1426 bucket(
const key_type& __key)
const
1427 {
return _M_h.bucket(__key); }
1438 {
return _M_h.begin(__n); }
1440 const_local_iterator
1441 begin(size_type __n)
const
1442 {
return _M_h.begin(__n); }
1444 const_local_iterator
1445 cbegin(size_type __n)
const
1446 {
return _M_h.cbegin(__n); }
1458 {
return _M_h.end(__n); }
1460 const_local_iterator
1461 end(size_type __n)
const
1462 {
return _M_h.end(__n); }
1464 const_local_iterator
1465 cend(size_type __n)
const
1466 {
return _M_h.cend(__n); }
1474 {
return _M_h.load_factor(); }
1480 {
return _M_h.max_load_factor(); }
1488 { _M_h.max_load_factor(__z); }
1499 { _M_h.rehash(__n); }
1510 { _M_h.reserve(__n); }
1512 template<
typename _Value1,
typename _Hash1,
typename _Pred1,
1519 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1521 swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
1522 unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
1523 noexcept(
noexcept(__x.swap(__y)))
1526 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1528 swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1529 unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1530 noexcept(
noexcept(__x.swap(__y)))
1533 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1535 operator==(
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
1536 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
1537 {
return __x._M_h._M_equal(__y._M_h); }
1539 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1541 operator!=(
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
1542 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
1543 {
return !(__x == __y); }
1545 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1547 operator==(
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1548 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1549 {
return __x._M_h._M_equal(__y._M_h); }
1551 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1553 operator!=(
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1554 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1555 {
return !(__x == __y); }
1557_GLIBCXX_END_NAMESPACE_CONTAINER
1559#if __cplusplus > 201402L
1560_GLIBCXX_BEGIN_NAMESPACE_VERSION
1562 template<
typename _Val,
typename _Hash1,
typename _Eq1,
typename _Alloc,
1563 typename _Hash2,
typename _Eq2>
1564 struct _Hash_merge_helper<
1565 _GLIBCXX_STD_C::unordered_set<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2>
1568 template<
typename... _Tp>
1569 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>;
1570 template<
typename... _Tp>
1571 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>;
1573 friend unordered_set<_Val, _Hash1, _Eq1, _Alloc>;
1576 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set)
1577 {
return __set._M_h; }
1580 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set)
1581 {
return __set._M_h; }
1585 template<
typename _Val,
typename _Hash1,
typename _Eq1,
typename _Alloc,
1586 typename _Hash2,
typename _Eq2>
1587 struct _Hash_merge_helper<
1588 _GLIBCXX_STD_C::unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>,
1592 template<
typename... _Tp>
1593 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>;
1594 template<
typename... _Tp>
1595 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>;
1597 friend unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>;
1600 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set)
1601 {
return __set._M_h; }
1604 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set)
1605 {
return __set._M_h; }
1607_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
Primary class template hash.
The standard allocator, as per [20.4].
Default range hashing function: use division to fold a large number into the range [0,...
Default ranged hash function H. In principle it should be a function object composed from objects of ...
Default value for rehash policy. Bucket size is (usually) the smallest prime that keeps the load fact...
One of the comparison functors.
Struct holding two objects of arbitrary type.
A standard container composed of equivalent keys (possibly containing multiple of each key value) in ...
iterator begin() noexcept
iterator insert(const_iterator __hint, const value_type &__x)
Inserts an element into the unordered_multiset.
void insert(initializer_list< value_type > __l)
Inserts a list of elements into the unordered_multiset.
_Hashtable::pointer pointer
Iterator-related typedefs.
void rehash(size_type __n)
May rehash the unordered_multiset.
local_iterator begin(size_type __n)
Returns a read-only (constant) iterator pointing to the first bucket element.
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_multiset.
float max_load_factor() const noexcept
Returns a positive number that the unordered_multiset tries to keep the load factor less than or equa...
bool empty() const noexcept
Returns true if the unordered_multiset is empty.
const_iterator cend() const noexcept
iterator emplace(_Args &&... __args)
Builds and insert an element into the unordered_multiset.
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.
unordered_multiset(const allocator_type &__a)
Creates an unordered_multiset with no elements.
iterator find(const key_type &__x)
Tries to locate an element in an unordered_multiset.
unordered_multiset & operator=(unordered_multiset &&)=default
Move assignment operator.
float load_factor() const noexcept
Returns the average number of elements per bucket.
unordered_multiset()=default
Default constructor.
_Hashtable::key_type key_type
Public typedefs.
unordered_multiset & operator=(const unordered_multiset &)=default
Copy assignment operator.
hasher hash_function() const
Returns the hash functor object with which the unordered_multiset was constructed.
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.
size_type count(const key_type &__x) const
Finds the number of elements.
iterator erase(const_iterator __position)
Erases an element from an unordered_multiset.
unordered_multiset(unordered_multiset &&)=default
Move constructor.
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Inserts an element into the unordered_multiset.
void swap(unordered_multiset &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_multiset.
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_multiset.
const_iterator cbegin() const noexcept
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_multiset was constructed.
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
iterator insert(const value_type &__x)
Inserts an element into the unordered_multiset.
void reserve(size_type __n)
Prepare the unordered_multiset for a specified number of elements.
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_multiset.
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.
unordered_multiset & operator=(initializer_list< value_type > __l)
Unordered_multiset list assignment operator.
size_type size() const noexcept
Returns the size of the unordered_multiset.
local_iterator end(size_type __n)
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
size_type max_size() const noexcept
Returns the maximum size of the unordered_multiset.
unordered_multiset(const unordered_multiset &)=default
Copy constructor.
size_type erase(const key_type &__x)
Erases elements according to the provided key.
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_multiset.
void max_load_factor(float __z)
Change the unordered_multiset maximum load factor.
A standard container composed of unique keys (containing at most one of each key value) in which the ...
std::pair< iterator, bool > insert(const value_type &__x)
Attempts to insert an element into the unordered_set.
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.
void max_load_factor(float __z)
Change the unordered_set maximum load factor.
const_iterator cend() const noexcept
_Hashtable::key_type key_type
Public typedefs.
size_type count(const key_type &__x) const
Finds the number of elements.
const_iterator cbegin() const noexcept
bool empty() const noexcept
Returns true if the unordered_set is empty.
unordered_set & operator=(initializer_list< value_type > __l)
Unordered_set list assignment operator.
unordered_set(unordered_set &&)=default
Move constructor.
unordered_set(const allocator_type &__a)
Creates an unordered_set with no elements.
void swap(unordered_set &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_set.
iterator insert(const_iterator __hint, const value_type &__x)
Attempts to insert an element into the unordered_set.
float load_factor() const noexcept
Returns the average number of elements per bucket.
void rehash(size_type __n)
May rehash the unordered_set.
local_iterator end(size_type __n)
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
size_type size() const noexcept
Returns the size of the unordered_set.
hasher hash_function() const
Returns the hash functor object with which the unordered_set was constructed.
unordered_set(const unordered_set &)=default
Copy constructor.
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to insert an element into the unordered_set.
key_equal key_eq() const
Returns the key comparison object with which the unordered_set was constructed.
local_iterator begin(size_type __n)
Returns a read-only (constant) iterator pointing to the first bucket element.
unordered_set()=default
Default constructor.
unordered_set & operator=(unordered_set &&)=default
Move assignment operator.
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
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.
std::pair< iterator, bool > emplace(_Args &&... __args)
Attempts to build and insert an element into the unordered_set.
unordered_set & operator=(const unordered_set &)=default
Copy assignment operator.
size_type erase(const key_type &__x)
Erases elements according to the provided key.
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.
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_set.
iterator erase(const_iterator __position)
Erases an element from an unordered_set.
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_set.
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into 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.
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_set.
void reserve(size_type __n)
Prepare the unordered_set for a specified number of elements.
_Hashtable::pointer pointer
Iterator-related typedefs.
iterator begin() noexcept
iterator find(const key_type &__x)
Tries to locate an element in an unordered_set.
size_type max_size() const noexcept
Returns the maximum size of the unordered_set.
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_set.