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;
111 typedef typename allocator_type::pointer
pointer;
136 : _M_h(__n, __hf, __eql, __a)
152 template<
typename _InputIterator>
158 : _M_h(__f, __l, __n, __hf, __eql, __a)
183 : _M_h(__l, __n, __hf, __eql, __a)
216 {
return _M_h.get_allocator(); }
223 {
return _M_h.empty(); }
228 {
return _M_h.size(); }
233 {
return _M_h.max_size(); }
244 {
return _M_h.begin(); }
248 {
return _M_h.begin(); }
258 {
return _M_h.end(); }
262 {
return _M_h.end(); }
271 {
return _M_h.begin(); }
279 {
return _M_h.end(); }
298 template<
typename... _Args>
301 {
return _M_h.emplace(std::forward<_Args>(__args)...); }
324 template<
typename... _Args>
327 {
return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
345 {
return _M_h.insert(__x); }
349 {
return _M_h.insert(std::move(__x)); }
374 {
return _M_h.insert(__hint, __x); }
378 {
return _M_h.insert(__hint, std::move(__x)); }
390 template<
typename _InputIterator>
392 insert(_InputIterator __first, _InputIterator __last)
393 { _M_h.insert(__first, __last); }
404 { _M_h.insert(__l); }
422 {
return _M_h.erase(__position); }
427 {
return _M_h.erase(__it); }
444 {
return _M_h.erase(__x); }
462 {
return _M_h.erase(__first, __last); }
485 { _M_h.swap(__x._M_h); }
493 {
return _M_h.hash_function(); }
499 {
return _M_h.key_eq(); }
517 {
return _M_h.find(__x); }
521 {
return _M_h.find(__x); }
535 {
return _M_h.count(__x); }
548 {
return _M_h.equal_range(__x); }
552 {
return _M_h.equal_range(__x); }
560 {
return _M_h.bucket_count(); }
565 {
return _M_h.max_bucket_count(); }
574 {
return _M_h.bucket_size(__n); }
583 {
return _M_h.bucket(__key); }
594 {
return _M_h.begin(__n); }
598 {
return _M_h.begin(__n); }
602 {
return _M_h.cbegin(__n); }
614 {
return _M_h.end(__n); }
618 {
return _M_h.end(__n); }
622 {
return _M_h.cend(__n); }
630 {
return _M_h.load_factor(); }
636 {
return _M_h.max_load_factor(); }
644 { _M_h.max_load_factor(__z); }
655 { _M_h.rehash(__n); }
666 { _M_h.reserve(__n); }
668 template<
typename _Value1,
typename _Hash1,
typename _Pred1,
694 template<
class _Value,
695 class _Hash = hash<_Value>,
709 typedef typename _Hashtable::hasher
hasher;
716 typedef typename allocator_type::pointer
pointer;
741 : _M_h(__n, __hf, __eql, __a)
757 template<
typename _InputIterator>
763 : _M_h(__f, __l, __n, __hf, __eql, __a)
788 : _M_h(__l, __n, __hf, __eql, __a)
821 {
return _M_h.get_allocator(); }
828 {
return _M_h.empty(); }
833 {
return _M_h.size(); }
838 {
return _M_h.max_size(); }
849 {
return _M_h.begin(); }
853 {
return _M_h.begin(); }
863 {
return _M_h.end(); }
867 {
return _M_h.end(); }
876 {
return _M_h.begin(); }
884 {
return _M_h.end(); }
895 template<
typename... _Args>
898 {
return _M_h.emplace(std::forward<_Args>(__args)...); }
917 template<
typename... _Args>
920 {
return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
932 {
return _M_h.insert(__x); }
936 {
return _M_h.insert(std::move(__x)); }
958 {
return _M_h.insert(__hint, __x); }
962 {
return _M_h.insert(__hint, std::move(__x)); }
973 template<
typename _InputIterator>
975 insert(_InputIterator __first, _InputIterator __last)
976 { _M_h.insert(__first, __last); }
987 { _M_h.insert(__l); }
1006 {
return _M_h.erase(__position); }
1011 {
return _M_h.erase(__it); }
1029 {
return _M_h.erase(__x); }
1049 {
return _M_h.erase(__first, __last); }
1073 { _M_h.swap(__x._M_h); }
1081 {
return _M_h.hash_function(); }
1087 {
return _M_h.key_eq(); }
1105 {
return _M_h.find(__x); }
1109 {
return _M_h.find(__x); }
1119 {
return _M_h.count(__x); }
1130 {
return _M_h.equal_range(__x); }
1134 {
return _M_h.equal_range(__x); }
1142 {
return _M_h.bucket_count(); }
1147 {
return _M_h.max_bucket_count(); }
1156 {
return _M_h.bucket_size(__n); }
1164 bucket(
const key_type& __key)
const
1165 {
return _M_h.bucket(__key); }
1176 {
return _M_h.begin(__n); }
1180 {
return _M_h.begin(__n); }
1184 {
return _M_h.cbegin(__n); }
1196 {
return _M_h.end(__n); }
1200 {
return _M_h.end(__n); }
1204 {
return _M_h.cend(__n); }
1212 {
return _M_h.load_factor(); }
1218 {
return _M_h.max_load_factor(); }
1226 { _M_h.max_load_factor(__z); }
1237 { _M_h.rehash(__n); }
1248 { _M_h.reserve(__n); }
1250 template<
typename _Value1,
typename _Hash1,
typename _Pred1,
1257 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1259 swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
1260 unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
1263 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1265 swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1266 unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1269 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1271 operator==(
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
1272 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
1273 {
return __x._M_h._M_equal(__y._M_h); }
1275 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1277 operator!=(
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
1278 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
1279 {
return !(__x == __y); }
1281 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1283 operator==(
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1284 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1285 {
return __x._M_h._M_equal(__y._M_h); }
1287 template<
class _Value,
class _Hash,
class _Pred,
class _Alloc>
1289 operator!=(
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1290 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1291 {
return !(__x == __y); }
1293 _GLIBCXX_END_NAMESPACE_CONTAINER