A standard container composed of unique keys (containing at most one of each key value) that associates values of another type with the keys.
The resulting value type of the container is std::pair<const Key, Tp>.
A standard container composed of equivalent keys (possibly containing multiple of each key value) that associates values of another type with the keys.
The resulting value type of the container is std::pair<const Key, Tp>.
34 _GLIBCXX_BEGIN_NAMESPACE_VERSION
38 template<
class _Key,
class _Tp,
39 class _Hash = hash<_Key>,
40 class _Pred = std::equal_to<_Key>,
41 class _Alloc = std::allocator<std::pair<const _Key, _Tp> >,
42 bool __cache_hash_code =
false>
44 :
public _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
45 std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
46 _Hash, __detail::_Mod_range_hashing,
47 __detail::_Default_ranged_hash,
48 __detail::_Prime_rehash_policy,
49 __cache_hash_code, false, true>
51 typedef _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
52 std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
53 _Hash, __detail::_Mod_range_hashing,
54 __detail::_Default_ranged_hash,
55 __detail::_Prime_rehash_policy,
56 __cache_hash_code,
false,
true>
60 typedef typename _Base::size_type size_type;
61 typedef typename _Base::hasher hasher;
62 typedef typename _Base::key_equal key_equal;
63 typedef typename _Base::allocator_type allocator_type;
66 __unordered_map(size_type __n = 10,
67 const hasher& __hf = hasher(),
68 const key_equal& __eql = key_equal(),
69 const allocator_type& __a = allocator_type())
70 : _Base(__n, __hf, __detail::_Mod_range_hashing(),
71 __detail::_Default_ranged_hash(),
72 __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
75 template<
typename _InputIterator>
76 __unordered_map(_InputIterator __f, _InputIterator __l,
78 const hasher& __hf = hasher(),
79 const key_equal& __eql = key_equal(),
80 const allocator_type& __a = allocator_type())
81 : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
82 __detail::_Default_ranged_hash(),
83 __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
87 template<
class _Key,
class _Tp,
88 class _Hash = hash<_Key>,
89 class _Pred = std::equal_to<_Key>,
90 class _Alloc = std::allocator<std::pair<const _Key, _Tp> >,
91 bool __cache_hash_code =
false>
92 class __unordered_multimap
93 :
public _Hashtable<_Key, std::pair<const _Key, _Tp>,
95 std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
96 _Hash, __detail::_Mod_range_hashing,
97 __detail::_Default_ranged_hash,
98 __detail::_Prime_rehash_policy,
99 __cache_hash_code, false, false>
101 typedef _Hashtable<_Key, std::pair<const _Key, _Tp>,
103 std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
104 _Hash, __detail::_Mod_range_hashing,
105 __detail::_Default_ranged_hash,
106 __detail::_Prime_rehash_policy,
107 __cache_hash_code,
false,
false>
111 typedef typename _Base::size_type size_type;
112 typedef typename _Base::hasher hasher;
113 typedef typename _Base::key_equal key_equal;
114 typedef typename _Base::allocator_type allocator_type;
117 __unordered_multimap(size_type __n = 10,
118 const hasher& __hf = hasher(),
119 const key_equal& __eql = key_equal(),
120 const allocator_type& __a = allocator_type())
121 : _Base(__n, __hf, __detail::_Mod_range_hashing(),
122 __detail::_Default_ranged_hash(),
123 __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
127 template<
typename _InputIterator>
128 __unordered_multimap(_InputIterator __f, _InputIterator __l,
129 typename _Base::size_type __n = 0,
130 const hasher& __hf = hasher(),
131 const key_equal& __eql = key_equal(),
132 const allocator_type& __a = allocator_type())
133 : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
134 __detail::_Default_ranged_hash(),
135 __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
139 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc,
140 bool __cache_hash_code>
142 swap(__unordered_map<_Key, _Tp, _Hash, _Pred,
143 _Alloc, __cache_hash_code>& __x,
144 __unordered_map<_Key, _Tp, _Hash, _Pred,
145 _Alloc, __cache_hash_code>& __y)
148 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc,
149 bool __cache_hash_code>
151 swap(__unordered_multimap<_Key, _Tp, _Hash, _Pred,
152 _Alloc, __cache_hash_code>& __x,
153 __unordered_multimap<_Key, _Tp, _Hash, _Pred,
154 _Alloc, __cache_hash_code>& __y)
176 template<
class _Key,
class _Tp,
177 class _Hash = hash<_Key>,
178 class _Pred = std::equal_to<_Key>,
179 class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
181 :
public __unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>
183 typedef __unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> _Base;
186 typedef typename _Base::value_type value_type;
187 typedef typename _Base::size_type size_type;
188 typedef typename _Base::hasher hasher;
189 typedef typename _Base::key_equal key_equal;
190 typedef typename _Base::allocator_type allocator_type;
193 unordered_map(size_type __n = 10,
194 const hasher& __hf = hasher(),
195 const key_equal& __eql = key_equal(),
196 const allocator_type& __a = allocator_type())
197 : _Base(__n, __hf, __eql, __a)
200 template<
typename _InputIterator>
201 unordered_map(_InputIterator __f, _InputIterator __l,
203 const hasher& __hf = hasher(),
204 const key_equal& __eql = key_equal(),
205 const allocator_type& __a = allocator_type())
206 : _Base(__f, __l, __n, __hf, __eql, __a)
228 template<
class _Key,
class _Tp,
229 class _Hash = hash<_Key>,
230 class _Pred = std::equal_to<_Key>,
231 class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
232 class unordered_multimap
233 :
public __unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
235 typedef __unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc> _Base;
238 typedef typename _Base::value_type value_type;
239 typedef typename _Base::size_type size_type;
240 typedef typename _Base::hasher hasher;
241 typedef typename _Base::key_equal key_equal;
242 typedef typename _Base::allocator_type allocator_type;
245 unordered_multimap(size_type __n = 10,
246 const hasher& __hf = hasher(),
247 const key_equal& __eql = key_equal(),
248 const allocator_type& __a = allocator_type())
249 : _Base(__n, __hf, __eql, __a)
253 template<
typename _InputIterator>
254 unordered_multimap(_InputIterator __f, _InputIterator __l,
255 typename _Base::size_type __n = 0,
256 const hasher& __hf = hasher(),
257 const key_equal& __eql = key_equal(),
258 const allocator_type& __a = allocator_type())
259 : _Base(__f, __l, __n, __hf, __eql, __a)
264 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
266 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
267 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
270 template<
class _Key,
class _Tp,
class _Hash,
class _Pred,
class _Alloc>
272 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
273 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
276 _GLIBCXX_END_NAMESPACE_VERSION
void swap(exception_ptr &__lhs, exception_ptr &__rhs)
Definition: exception_ptr.h:160