32 _GLIBCXX_BEGIN_NAMESPACE_TR1
36 template<
class _Key,
class _Tp,
37 class _Hash = hash<_Key>,
40 bool __cache_hash_code =
false>
42 :
public _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
43 std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
44 _Hash, __detail::_Mod_range_hashing,
45 __detail::_Default_ranged_hash,
46 __detail::_Prime_rehash_policy,
47 __cache_hash_code, false, true>
49 typedef _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
50 std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
51 _Hash, __detail::_Mod_range_hashing,
52 __detail::_Default_ranged_hash,
53 __detail::_Prime_rehash_policy,
54 __cache_hash_code,
false,
true>
58 typedef typename _Base::size_type size_type;
59 typedef typename _Base::hasher hasher;
60 typedef typename _Base::key_equal key_equal;
61 typedef typename _Base::allocator_type allocator_type;
64 __unordered_map(size_type __n = 10,
65 const hasher& __hf = hasher(),
66 const key_equal& __eql = key_equal(),
67 const allocator_type& __a = allocator_type())
68 : _Base(__n, __hf, __detail::_Mod_range_hashing(),
69 __detail::_Default_ranged_hash(),
70 __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
73 template<
typename _InputIterator>
74 __unordered_map(_InputIterator __f, _InputIterator __l,
76 const hasher& __hf = hasher(),
77 const key_equal& __eql = key_equal(),
78 const allocator_type& __a = allocator_type())
79 : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
80 __detail::_Default_ranged_hash(),
81 __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
84 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
85 __unordered_map(__unordered_map&& __x)
86 : _Base(std::forward<_Base>(__x)) { }
90 template<
class _Key,
class _Tp,
91 class _Hash = hash<_Key>,
94 bool __cache_hash_code =
false>
95 class __unordered_multimap
96 :
public _Hashtable<_Key, std::pair<const _Key, _Tp>,
98 std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
99 _Hash, __detail::_Mod_range_hashing,
100 __detail::_Default_ranged_hash,
101 __detail::_Prime_rehash_policy,
102 __cache_hash_code, false, false>
104 typedef _Hashtable<_Key, std::pair<const _Key, _Tp>,
106 std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
107 _Hash, __detail::_Mod_range_hashing,
108 __detail::_Default_ranged_hash,
109 __detail::_Prime_rehash_policy,
110 __cache_hash_code,
false,
false>
114 typedef typename _Base::size_type size_type;
115 typedef typename _Base::hasher hasher;
116 typedef typename _Base::key_equal key_equal;
117 typedef typename _Base::allocator_type allocator_type;
120 __unordered_multimap(size_type __n = 10,
121 const hasher& __hf = hasher(),
122 const key_equal& __eql = key_equal(),
123 const allocator_type& __a = allocator_type())
124 : _Base(__n, __hf, __detail::_Mod_range_hashing(),
125 __detail::_Default_ranged_hash(),
126 __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
130 template<
typename _InputIterator>
131 __unordered_multimap(_InputIterator __f, _InputIterator __l,
132 typename _Base::size_type __n = 0,
133 const hasher& __hf = hasher(),
134 const key_equal& __eql = key_equal(),
135 const allocator_type& __a = allocator_type())
136 : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
137 __detail::_Default_ranged_hash(),
138 __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
141 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
142 __unordered_multimap(__unordered_multimap&& __x)
143 : _Base(std::forward<_Base>(__x)) { }
147 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc,
148 bool __cache_hash_code>
150 swap(__unordered_map<_Key, _Tp, _Hash, _Pred,
151 _Alloc, __cache_hash_code>& __x,
152 __unordered_map<_Key, _Tp, _Hash, _Pred,
153 _Alloc, __cache_hash_code>& __y)
156 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc,
157 bool __cache_hash_code>
159 swap(__unordered_multimap<_Key, _Tp, _Hash, _Pred,
160 _Alloc, __cache_hash_code>& __x,
161 __unordered_multimap<_Key, _Tp, _Hash, _Pred,
162 _Alloc, __cache_hash_code>& __y)
184 template<
class _Key,
class _Tp,
185 class _Hash = hash<_Key>,
189 :
public __unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>
191 typedef __unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> _Base;
195 typedef typename _Base::size_type size_type;
196 typedef typename _Base::hasher hasher;
197 typedef typename _Base::key_equal key_equal;
198 typedef typename _Base::allocator_type allocator_type;
202 const hasher& __hf = hasher(),
203 const key_equal& __eql = key_equal(),
204 const allocator_type& __a = allocator_type())
205 : _Base(__n, __hf, __eql, __a)
208 template<
typename _InputIterator>
211 const hasher& __hf = hasher(),
212 const key_equal& __eql = key_equal(),
213 const allocator_type& __a = allocator_type())
214 : _Base(__f, __l, __n, __hf, __eql, __a)
217 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
219 : _Base(std::forward<_Base>(__x)) { }
223 const hasher& __hf = hasher(),
224 const key_equal& __eql = key_equal(),
225 const allocator_type& __a = allocator_type())
226 : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
242 this->insert(__l.begin(), __l.end());
266 template<
class _Key,
class _Tp,
271 :
public __unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
273 typedef __unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc> _Base;
277 typedef typename _Base::size_type size_type;
278 typedef typename _Base::hasher hasher;
279 typedef typename _Base::key_equal key_equal;
280 typedef typename _Base::allocator_type allocator_type;
284 const hasher& __hf = hasher(),
285 const key_equal& __eql = key_equal(),
286 const allocator_type& __a = allocator_type())
287 : _Base(__n, __hf, __eql, __a)
291 template<
typename _InputIterator>
293 typename _Base::size_type __n = 0,
294 const hasher& __hf = hasher(),
295 const key_equal& __eql = key_equal(),
296 const allocator_type& __a = allocator_type())
297 : _Base(__f, __l, __n, __hf, __eql, __a)
300 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
302 : _Base(std::forward<_Base>(__x)) { }
306 const hasher& __hf = hasher(),
307 const key_equal& __eql = key_equal(),
308 const allocator_type& __a = allocator_type())
309 : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
325 this->insert(__l.begin(), __l.end());
331 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
337 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
339 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
340 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
343 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
344 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
346 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
347 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
350 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
352 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
353 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
356 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
358 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
359 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
362 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
364 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
365 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
369 _GLIBCXX_END_NAMESPACE_TR1