30 #ifndef _UNORDERED_MAP_H
31 #define _UNORDERED_MAP_H
33 namespace std _GLIBCXX_VISIBILITY(default)
35 _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
41 template<
typename _Key,
48 _Alloc, __detail::_Select1st,
58 template<
typename _Key,
65 _Alloc, __detail::_Select1st,
93 template<
class _Key,
class _Tp,
109 typedef typename _Hashtable::hasher
hasher;
116 typedef typename allocator_type::pointer
pointer;
142 : _M_h(__n, __hf, __eql, __a)
158 template<
typename _InputIterator>
164 : _M_h(__f, __l, __n, __hf, __eql, __a)
189 : _M_h(__l, __n, __hf, __eql, __a)
222 {
return _M_h.get_allocator(); }
229 {
return _M_h.empty(); }
234 {
return _M_h.size(); }
239 {
return _M_h.max_size(); }
249 {
return _M_h.begin(); }
258 {
return _M_h.begin(); }
262 {
return _M_h.begin(); }
271 {
return _M_h.end(); }
280 {
return _M_h.end(); }
284 {
return _M_h.end(); }
308 template<
typename... _Args>
311 {
return _M_h.emplace(std::forward<_Args>(__args)...); }
338 template<
typename... _Args>
341 {
return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
363 {
return _M_h.insert(__x); }
365 template<
typename _Pair,
typename =
typename
367 _Pair&&>::value>::type>
370 {
return _M_h.insert(std::move(__x)); }
397 {
return _M_h.insert(__hint, __x); }
399 template<
typename _Pair,
typename =
typename
401 _Pair&&>::value>::type>
404 {
return _M_h.insert(__hint, std::move(__x)); }
416 template<
typename _InputIterator>
418 insert(_InputIterator __first, _InputIterator __last)
419 { _M_h.insert(__first, __last); }
430 { _M_h.insert(__l); }
448 {
return _M_h.erase(__position); }
453 {
return _M_h.erase(__it); }
470 {
return _M_h.erase(__x); }
488 {
return _M_h.erase(__first, __last); }
511 { _M_h.swap(__x._M_h); }
519 {
return _M_h.hash_function(); }
525 {
return _M_h.key_eq(); }
543 {
return _M_h.find(__x); }
547 {
return _M_h.find(__x); }
561 {
return _M_h.count(__x); }
574 {
return _M_h.equal_range(__x); }
578 {
return _M_h.equal_range(__x); }
596 {
return _M_h[__k]; }
600 {
return _M_h[std::move(__k)]; }
613 {
return _M_h.at(__k); }
617 {
return _M_h.at(__k); }
625 {
return _M_h.bucket_count(); }
630 {
return _M_h.max_bucket_count(); }
639 {
return _M_h.bucket_size(__n); }
648 {
return _M_h.bucket(__key); }
658 {
return _M_h.begin(__n); }
669 {
return _M_h.begin(__n); }
673 {
return _M_h.cbegin(__n); }
684 {
return _M_h.end(__n); }
695 {
return _M_h.end(__n); }
699 {
return _M_h.cend(__n); }
707 {
return _M_h.load_factor(); }
713 {
return _M_h.max_load_factor(); }
721 { _M_h.max_load_factor(__z); }
732 { _M_h.rehash(__n); }
743 { _M_h.reserve(__n); }
745 template<
typename _Key1,
typename _Tp1,
typename _Hash1,
typename _Pred1,
774 template<
class _Key,
class _Tp,
775 class _Hash = hash<_Key>,
790 typedef typename _Hashtable::hasher
hasher;
797 typedef typename allocator_type::pointer
pointer;
823 : _M_h(__n, __hf, __eql, __a)
839 template<
typename _InputIterator>
845 : _M_h(__f, __l, __n, __hf, __eql, __a)
870 : _M_h(__l, __n, __hf, __eql, __a)
903 {
return _M_h.get_allocator(); }
910 {
return _M_h.empty(); }
915 {
return _M_h.size(); }
920 {
return _M_h.max_size(); }
930 {
return _M_h.begin(); }
939 {
return _M_h.begin(); }
943 {
return _M_h.begin(); }
952 {
return _M_h.end(); }
961 {
return _M_h.end(); }
965 {
return _M_h.end(); }
985 template<
typename... _Args>
988 {
return _M_h.emplace(std::forward<_Args>(__args)...); }
1011 template<
typename... _Args>
1014 {
return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
1028 {
return _M_h.insert(__x); }
1030 template<
typename _Pair,
typename =
typename
1032 _Pair&&>::value>::type>
1035 {
return _M_h.insert(std::move(__x)); }
1060 {
return _M_h.insert(__hint, __x); }
1062 template<
typename _Pair,
typename =
typename
1064 _Pair&&>::value>::type>
1067 {
return _M_h.insert(__hint, std::move(__x)); }
1079 template<
typename _InputIterator>
1081 insert(_InputIterator __first, _InputIterator __last)
1082 { _M_h.insert(__first, __last); }
1094 { _M_h.insert(__l); }
1112 {
return _M_h.erase(__position); }
1117 {
return _M_h.erase(__it); }
1133 {
return _M_h.erase(__x); }
1152 {
return _M_h.erase(__first, __last); }
1176 { _M_h.swap(__x._M_h); }
1184 {
return _M_h.hash_function(); }
1190 {
return _M_h.key_eq(); }
1208 {
return _M_h.find(__x); }
1212 {
return _M_h.find(__x); }
1222 {
return _M_h.count(__x); }
1233 {
return _M_h.equal_range(__x); }
1237 {
return _M_h.equal_range(__x); }
1245 {
return _M_h.bucket_count(); }
1250 {
return _M_h.max_bucket_count(); }
1259 {
return _M_h.bucket_size(__n); }
1267 bucket(
const key_type& __key)
const
1268 {
return _M_h.bucket(__key); }
1278 {
return _M_h.begin(__n); }
1289 {
return _M_h.begin(__n); }
1293 {
return _M_h.cbegin(__n); }
1304 {
return _M_h.end(__n); }
1315 {
return _M_h.end(__n); }
1319 {
return _M_h.cend(__n); }
1327 {
return _M_h.load_factor(); }
1333 {
return _M_h.max_load_factor(); }
1341 { _M_h.max_load_factor(__z); }
1352 { _M_h.rehash(__n); }
1363 { _M_h.reserve(__n); }
1365 template<
typename _Key1,
typename _Tp1,
typename _Hash1,
typename _Pred1,
1369 _Hash1, _Pred1, _Alloc1>&,
1371 _Hash1, _Pred1, _Alloc1>&);
1374 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
1376 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
1377 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
1380 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
1382 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
1383 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
1386 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
1388 operator==(
const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
1389 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
1390 {
return __x._M_h._M_equal(__y._M_h); }
1392 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
1394 operator!=(
const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
1395 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
1396 {
return !(__x == __y); }
1398 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
1400 operator==(
const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
1401 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
1402 {
return __x._M_h._M_equal(__y._M_h); }
1404 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
1406 operator!=(
const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
1407 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
1408 {
return !(__x == __y); }
1410 _GLIBCXX_END_NAMESPACE_CONTAINER