30 #ifndef _UNORDERED_SET_H
31 #define _UNORDERED_SET_H
33 namespace std _GLIBCXX_VISIBILITY(default)
35 _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
41 template<
typename _Value,
47 __detail::_Identity, _Pred, _Hash,
56 template<
typename _Value,
89 template<
class _Value,
104 typedef typename _Hashtable::hasher
hasher;
136 : _M_h(__n, __hf, __eql, __a)
152 template<
typename _InputIterator>
158 : _M_h(__f, __l, __n, __hf, __eql, __a)
183 : _M_h(__uset._M_h, __a)
193 : _M_h(std::move(__uset._M_h), __a)
212 : _M_h(__l, __n, __hf, __eql, __a)
245 {
return _M_h.get_allocator(); }
252 {
return _M_h.empty(); }
257 {
return _M_h.size(); }
262 {
return _M_h.max_size(); }
273 {
return _M_h.begin(); }
277 {
return _M_h.begin(); }
287 {
return _M_h.end(); }
291 {
return _M_h.end(); }
300 {
return _M_h.begin(); }
308 {
return _M_h.end(); }
327 template<
typename... _Args>
330 {
return _M_h.emplace(std::forward<_Args>(__args)...); }
353 template<
typename... _Args>
356 {
return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
374 {
return _M_h.insert(__x); }
378 {
return _M_h.insert(std::move(__x)); }
403 {
return _M_h.insert(__hint, __x); }
407 {
return _M_h.insert(__hint, std::move(__x)); }
419 template<
typename _InputIterator>
421 insert(_InputIterator __first, _InputIterator __last)
422 { _M_h.insert(__first, __last); }
433 { _M_h.insert(__l); }
451 {
return _M_h.erase(__position); }
456 {
return _M_h.erase(__it); }
473 {
return _M_h.erase(__x); }
491 {
return _M_h.erase(__first, __last); }
514 noexcept( noexcept(_M_h.swap(__x._M_h)) )
515 { _M_h.swap(__x._M_h); }
523 {
return _M_h.hash_function(); }
529 {
return _M_h.key_eq(); }
547 {
return _M_h.find(__x); }
551 {
return _M_h.find(__x); }
565 {
return _M_h.count(__x); }
578 {
return _M_h.equal_range(__x); }
582 {
return _M_h.equal_range(__x); }
590 {
return _M_h.bucket_count(); }
595 {
return _M_h.max_bucket_count(); }
604 {
return _M_h.bucket_size(__n); }
613 {
return _M_h.bucket(__key); }
624 {
return _M_h.begin(__n); }
628 {
return _M_h.begin(__n); }
632 {
return _M_h.cbegin(__n); }
644 {
return _M_h.end(__n); }
648 {
return _M_h.end(__n); }
652 {
return _M_h.cend(__n); }
660 {
return _M_h.load_factor(); }
666 {
return _M_h.max_load_factor(); }
674 { _M_h.max_load_factor(__z); }
685 { _M_h.rehash(__n); }
696 { _M_h.reserve(__n); }
698 template<
typename _Value1,
typename _Hash1,
typename _Pred1,
724 template<
class _Value,
725 class _Hash = hash<_Value>,
739 typedef typename _Hashtable::hasher
hasher;
771 : _M_h(__n, __hf, __eql, __a)
787 template<
typename _InputIterator>
793 : _M_h(__f, __l, __n, __hf, __eql, __a)
818 : _M_h(__l, __n, __hf, __eql, __a)
845 : _M_h(__umset._M_h, __a)
855 : _M_h(std::move(__umset._M_h), __a)
880 {
return _M_h.get_allocator(); }
887 {
return _M_h.empty(); }
892 {
return _M_h.size(); }
897 {
return _M_h.max_size(); }
908 {
return _M_h.begin(); }
912 {
return _M_h.begin(); }
922 {
return _M_h.end(); }
926 {
return _M_h.end(); }
935 {
return _M_h.begin(); }
943 {
return _M_h.end(); }
954 template<
typename... _Args>
957 {
return _M_h.emplace(std::forward<_Args>(__args)...); }
976 template<
typename... _Args>
979 {
return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
991 {
return _M_h.insert(__x); }
995 {
return _M_h.insert(std::move(__x)); }
1017 {
return _M_h.insert(__hint, __x); }
1021 {
return _M_h.insert(__hint, std::move(__x)); }
1032 template<
typename _InputIterator>
1034 insert(_InputIterator __first, _InputIterator __last)
1035 { _M_h.insert(__first, __last); }
1046 { _M_h.insert(__l); }
1065 {
return _M_h.erase(__position); }
1070 {
return _M_h.erase(__it); }
1088 {
return _M_h.erase(__x); }
1108 {
return _M_h.erase(__first, __last); }
1132 noexcept( noexcept(_M_h.swap(__x._M_h)) )
1133 { _M_h.swap(__x._M_h); }
1141 {
return _M_h.hash_function(); }
1147 {
return _M_h.key_eq(); }
1165 {
return _M_h.find(__x); }
1169 {
return _M_h.find(__x); }
1179 {
return _M_h.count(__x); }
1190 {
return _M_h.equal_range(__x); }
1194 {
return _M_h.equal_range(__x); }
1202 {
return _M_h.bucket_count(); }
1207 {
return _M_h.max_bucket_count(); }
1216 {
return _M_h.bucket_size(__n); }
1224 bucket(
const key_type& __key)
const
1225 {
return _M_h.bucket(__key); }
1236 {
return _M_h.begin(__n); }
1240 {
return _M_h.begin(__n); }
1244 {
return _M_h.cbegin(__n); }
1256 {
return _M_h.end(__n); }
1260 {
return _M_h.end(__n); }
1264 {
return _M_h.cend(__n); }
1272 {
return _M_h.load_factor(); }
1278 {
return _M_h.max_load_factor(); }
1286 { _M_h.max_load_factor(__z); }
1297 { _M_h.rehash(__n); }
1308 { _M_h.reserve(__n); }
1310 template<
typename _Value1,
typename _Hash1,
typename _Pred1,
1317 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1319 swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
1320 unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
1323 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1325 swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1326 unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1329 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1331 operator==(
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
1332 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
1333 {
return __x._M_h._M_equal(__y._M_h); }
1335 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1337 operator!=(
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
1338 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
1339 {
return !(__x == __y); }
1341 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1343 operator==(
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1344 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1345 {
return __x._M_h._M_equal(__y._M_h); }
1347 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1349 operator!=(
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1350 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1351 {
return !(__x == __y); }
1353 _GLIBCXX_END_NAMESPACE_CONTAINER