87 __glibcxx_class_requires(_Value, _SGIAssignableConcept)
88 __glibcxx_class_requires3(_HashFcn,
size_t, _Value, _UnaryFunctionConcept)
89 __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
94 typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
95 _EqualKey, _Alloc> _Ht;
99 typedef typename _Ht::key_type key_type;
100 typedef typename _Ht::value_type value_type;
101 typedef typename _Ht::hasher hasher;
102 typedef typename _Ht::key_equal key_equal;
104 typedef typename _Ht::size_type size_type;
105 typedef typename _Ht::difference_type difference_type;
106 typedef typename _Alloc_traits::pointer pointer;
107 typedef typename _Alloc_traits::const_pointer const_pointer;
108 typedef typename _Alloc_traits::reference reference;
109 typedef typename _Alloc_traits::const_reference const_reference;
111 typedef typename _Ht::const_iterator iterator;
112 typedef typename _Ht::const_iterator const_iterator;
114 typedef typename _Ht::allocator_type allocator_type;
118 {
return _M_ht.hash_funct(); }
122 {
return _M_ht.key_eq(); }
125 get_allocator()
const
126 {
return _M_ht.get_allocator(); }
129 : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
133 : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
135 hash_set(size_type __n,
const hasher& __hf)
136 : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
138 hash_set(size_type __n,
const hasher& __hf,
const key_equal& __eql,
139 const allocator_type& __a = allocator_type())
140 : _M_ht(__n, __hf, __eql, __a) {}
142 template<
class _InputIterator>
143 hash_set(_InputIterator __f, _InputIterator __l)
144 : _M_ht(100, hasher(), key_equal(), allocator_type())
145 { _M_ht.insert_unique(__f, __l); }
147 template<
class _InputIterator>
148 hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
149 : _M_ht(__n, hasher(), key_equal(), allocator_type())
150 { _M_ht.insert_unique(__f, __l); }
152 template<
class _InputIterator>
153 hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
155 : _M_ht(__n, __hf, key_equal(), allocator_type())
156 { _M_ht.insert_unique(__f, __l); }
158 template<
class _InputIterator>
159 hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
160 const hasher& __hf,
const key_equal& __eql,
161 const allocator_type& __a = allocator_type())
162 : _M_ht(__n, __hf, __eql, __a)
163 { _M_ht.insert_unique(__f, __l); }
167 {
return _M_ht.size(); }
171 {
return _M_ht.max_size(); }
173 _GLIBCXX_NODISCARD
bool
175 {
return _M_ht.empty(); }
179 { _M_ht.swap(__hs._M_ht); }
181 template<
class _Val,
class _HF,
class _EqK,
class _Al>
188 {
return _M_ht.begin(); }
192 {
return _M_ht.end(); }
195 insert(
const value_type& __obj)
201 template<
class _InputIterator>
203 insert(_InputIterator __f, _InputIterator __l)
204 { _M_ht.insert_unique(__f, __l); }
207 insert_noresize(
const value_type& __obj)
210 = _M_ht.insert_unique_noresize(__obj);
215 find(
const key_type& __key)
const
216 {
return _M_ht.find(__key); }
219 count(
const key_type& __key)
const
220 {
return _M_ht.count(__key); }
223 equal_range(
const key_type& __key)
const
224 {
return _M_ht.equal_range(__key); }
227 erase(
const key_type& __key)
228 {
return _M_ht.erase(__key); }
232 { _M_ht.erase(__it); }
235 erase(iterator __f, iterator __l)
236 { _M_ht.erase(__f, __l); }
243 resize(size_type __hint)
244 { _M_ht.resize(__hint); }
248 {
return _M_ht.bucket_count(); }
251 max_bucket_count()
const
252 {
return _M_ht.max_bucket_count(); }
255 elems_in_bucket(size_type __n)
const
256 {
return _M_ht.elems_in_bucket(__n); }
290 __glibcxx_class_requires(_Value, _SGIAssignableConcept)
291 __glibcxx_class_requires3(_HashFcn,
size_t, _Value, _UnaryFunctionConcept)
292 __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
295 typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
296 _EqualKey, _Alloc> _Ht;
300 typedef typename _Ht::key_type key_type;
301 typedef typename _Ht::value_type value_type;
302 typedef typename _Ht::hasher hasher;
303 typedef typename _Ht::key_equal key_equal;
305 typedef typename _Ht::size_type size_type;
306 typedef typename _Ht::difference_type difference_type;
307 typedef typename _Alloc::pointer pointer;
308 typedef typename _Alloc::const_pointer const_pointer;
309 typedef typename _Alloc::reference reference;
310 typedef typename _Alloc::const_reference const_reference;
312 typedef typename _Ht::const_iterator iterator;
313 typedef typename _Ht::const_iterator const_iterator;
315 typedef typename _Ht::allocator_type allocator_type;
319 {
return _M_ht.hash_funct(); }
323 {
return _M_ht.key_eq(); }
326 get_allocator()
const
327 {
return _M_ht.get_allocator(); }
330 : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
334 : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
337 : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
339 hash_multiset(size_type __n,
const hasher& __hf,
const key_equal& __eql,
340 const allocator_type& __a = allocator_type())
341 : _M_ht(__n, __hf, __eql, __a) {}
343 template<
class _InputIterator>
345 : _M_ht(100, hasher(), key_equal(), allocator_type())
346 { _M_ht.insert_equal(__f, __l); }
348 template<
class _InputIterator>
349 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
350 : _M_ht(__n, hasher(), key_equal(), allocator_type())
351 { _M_ht.insert_equal(__f, __l); }
353 template<
class _InputIterator>
354 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
356 : _M_ht(__n, __hf, key_equal(), allocator_type())
357 { _M_ht.insert_equal(__f, __l); }
359 template<
class _InputIterator>
360 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
361 const hasher& __hf,
const key_equal& __eql,
362 const allocator_type& __a = allocator_type())
363 : _M_ht(__n, __hf, __eql, __a)
364 { _M_ht.insert_equal(__f, __l); }
368 {
return _M_ht.size(); }
372 {
return _M_ht.max_size(); }
374 _GLIBCXX_NODISCARD
bool
376 {
return _M_ht.empty(); }
380 { _M_ht.swap(hs._M_ht); }
382 template<
class _Val,
class _HF,
class _EqK,
class _Al>
389 {
return _M_ht.begin(); }
393 {
return _M_ht.end(); }
396 insert(
const value_type& __obj)
397 {
return _M_ht.insert_equal(__obj); }
399 template<
class _InputIterator>
401 insert(_InputIterator __f, _InputIterator __l)
402 { _M_ht.insert_equal(__f,__l); }
405 insert_noresize(
const value_type& __obj)
406 {
return _M_ht.insert_equal_noresize(__obj); }
409 find(
const key_type& __key)
const
410 {
return _M_ht.find(__key); }
413 count(
const key_type& __key)
const
414 {
return _M_ht.count(__key); }
417 equal_range(
const key_type& __key)
const
418 {
return _M_ht.equal_range(__key); }
421 erase(
const key_type& __key)
422 {
return _M_ht.erase(__key); }
426 { _M_ht.erase(__it); }
429 erase(iterator __f, iterator __l)
430 { _M_ht.erase(__f, __l); }
437 resize(size_type __hint)
438 { _M_ht.resize(__hint); }
442 {
return _M_ht.bucket_count(); }
445 max_bucket_count()
const
446 {
return _M_ht.max_bucket_count(); }
449 elems_in_bucket(size_type __n)
const
450 {
return _M_ht.elems_in_bucket(__n); }