BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstp_hashset.h
Go to the documentation of this file.
1/// @file bslstp_hashset.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslstp_hashset.h -*-C++-*-
8#ifndef INCLUDED_BSLSTP_HASHSET
9#define INCLUDED_BSLSTP_HASHSET
10
11/// @defgroup bslstp_hashset bslstp_hashset
12/// @brief Provide containers hashed by value.
13/// @addtogroup bsl
14/// @{
15/// @addtogroup bslstp
16/// @{
17/// @addtogroup bslstp_hashset
18/// @{
19///
20/// <h1> Outline </h1>
21/// * <a href="#bslstp_hashset-purpose"> Purpose</a>
22/// * <a href="#bslstp_hashset-classes"> Classes </a>
23/// * <a href="#bslstp_hashset-description"> Description </a>
24/// * <a href="#bslstp_hashset-usage"> Usage </a>
25///
26/// # Purpose {#bslstp_hashset-purpose}
27/// Provide containers hashed by value.
28///
29/// @deprecated Do not use directly.
30///
31/// # Classes {#bslstp_hashset-classes}
32///
33/// - bsl::hash_set: container of unique values
34/// - bsl::hash_multiset: container of possibly non-unique values
35///
36/// @see bsl_unordered_set
37///
38/// # Description {#bslstp_hashset-description}
39/// This component is for internal use only.
40///
41/// Note that the functions in this component are based on STLPort's
42/// implementation, with copyright notice as follows:
43/// @code
44/// /*
45/// * Copyright (c) 1996,1997
46/// * Silicon Graphics Computer Systems, Inc.
47/// *
48/// * Copyright (c) 1999
49/// * Boris Fomitchev
50/// *
51/// * This material is provided "as is", with absolutely no warranty expressed
52/// * or implied. Any use is at your own risk.
53/// *
54/// * Permission to use or copy this software for any purpose is hereby granted
55/// * without fee, provided the above notices are retained on all copies.
56/// * Permission to modify the code and to distribute modified code is granted,
57/// * provided the above notices are retained, and a notice that the code was
58/// * modified is included with the above copyright notice.
59/// *
60/// */
61///
62/// // Contents originally from stl/_hash_set.h
63///
64/// /*
65/// *
66/// * Copyright (c) 1994
67/// * Hewlett-Packard Company
68/// *
69/// * Copyright (c) 1996,1997
70/// * Silicon Graphics Computer Systems, Inc.
71/// *
72/// * Copyright (c) 1997
73/// * Moscow Center for SPARC Technology
74/// *
75/// * Copyright (c) 1999
76/// * Boris Fomitchev
77/// *
78/// * This material is provided "as is", with absolutely no warranty expressed
79/// * or implied. Any use is at your own risk.
80/// *
81/// * Permission to use or copy this software for any purpose is hereby granted
82/// * without fee, provided the above notices are retained on all copies.
83/// * Permission to modify the code and to distribute modified code is granted,
84/// * provided the above notices are retained, and a notice that the code was
85/// * modified is included with the above copyright notice.
86/// *
87/// */
88/// @endcode
89///
90/// ## Usage {#bslstp_hashset-usage}
91///
92///
93/// This component is for internal use only.
94/// @}
95/** @} */
96/** @} */
97
98/** @addtogroup bsl
99 * @{
100 */
101/** @addtogroup bslstp
102 * @{
103 */
104/** @addtogroup bslstp_hashset
105 * @{
106 */
107
108#ifdef BDE_OPENSOURCE_PUBLICATION // STP
109#error "bslstp_hashset is not for publication"
110#endif
111#include <bslscm_version.h>
112
113#include <bslstp_exfunctional.h>
114#include <bslstp_hash.h>
115#include <bslstp_hashtable.h>
116
118
120
121#include <functional>
122
123namespace bsl {
124
125template <class _Value,
126 class _HashFcn =
127 typename ::BloombergLP::bslstp::HashSelector<_Value>::Type,
128 class _EqualKey = typename bsl::ComparatorSelector<_Value>::Type,
129 class _Alloc = bsl::allocator<_Value> >
131{
132private:
133 typedef hashtable<_Value, _Value, _HashFcn,
134 ::BloombergLP::bslstp::Identity<_Value>,
135 _EqualKey, _Alloc> _Ht;
137 typedef typename _Ht::iterator _ht_iterator;
138public:
139 typedef typename _Ht::key_type key_type;
140 typedef typename _Ht::value_type value_type;
141 typedef typename _Ht::hasher hasher;
142 typedef typename _Ht::key_equal key_equal;
143
144 typedef typename _Ht::size_type size_type;
146 typedef typename _Ht::pointer pointer;
148 typedef typename _Ht::reference reference;
150
151 // SunPro bug
154
156
157 hasher hash_funct() const { return _M_ht.hash_funct(); }
158 key_equal key_eq() const { return _M_ht.key_eq(); }
159 allocator_type get_allocator() const { return _M_ht.get_allocator(); }
160
161private:
162 _Ht _M_ht;
163
164public:
166 : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
167 explicit hash_set(size_type __n)
168 : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
169 hash_set(size_type __n, const hasher& __hf)
170 : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
171
172 // Constructors with alternative allocator.
173 explicit hash_set(const allocator_type& __a)
174 : _M_ht(100, hasher(), key_equal(), __a) {}
176 : _M_ht(__n, hasher(), key_equal(), __a) {}
177 hash_set(size_type __n, const hasher& __hf, const allocator_type& __a)
178 : _M_ht(__n, __hf, key_equal(), __a) {}
179
180 hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
181 const allocator_type& __a = allocator_type())
182 : _M_ht(__n, __hf, __eql, __a) {}
183
184 template <class _InputIterator>
185 hash_set(_InputIterator __f, _InputIterator __l)
186 : _M_ht(100, hasher(), key_equal(), allocator_type())
187 { _M_ht.insert_unique(__f, __l); }
188 template <class _InputIterator>
189 hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
190 : _M_ht(__n, hasher(), key_equal(), allocator_type())
191 { _M_ht.insert_unique(__f, __l); }
192 template <class _InputIterator>
193 hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
194 const hasher& __hf)
195 : _M_ht(__n, __hf, key_equal(), allocator_type())
196 { _M_ht.insert_unique(__f, __l); }
197
198 // Constructors with alternative allocator.
199 template <class _InputIterator>
200 hash_set(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
201 : _M_ht(100, hasher(), key_equal(), __a)
202 { _M_ht.insert_unique(__f, __l); }
203 template <class _InputIterator>
204 hash_set(_InputIterator __f, _InputIterator __l, size_type __n, const allocator_type& __a)
205 : _M_ht(__n, hasher(), key_equal(), __a)
206 { _M_ht.insert_unique(__f, __l); }
207 template <class _InputIterator>
208 hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
209 const hasher& __hf, const allocator_type& __a)
210 : _M_ht(__n, __hf, key_equal(), __a)
211 { _M_ht.insert_unique(__f, __l); }
212
213 template <class _InputIterator>
214 hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
215 const hasher& __hf, const key_equal& __eql,
216 const allocator_type& __a = allocator_type())
217 : _M_ht(__n, __hf, __eql, __a)
218 { _M_ht.insert_unique(__f, __l); }
219
220 // Copy-construct with alternative allocator.
221 // NOTE: Default copy-constructor is generated by the compiler
222 hash_set(const _Self& __x, const allocator_type& __a)
223 : _M_ht(__x._M_ht, __a) { }
224
225public:
226 size_type size() const { return _M_ht.size(); }
227 size_type max_size() const { return _M_ht.max_size(); }
228 bool empty() const { return _M_ht.empty(); }
229 void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
230
231 iterator begin() const { return _M_ht.begin(); }
232 iterator end() const { return _M_ht.end(); }
233
234public:
236 {
237 pair<_ht_iterator, bool> __p = _M_ht.insert_unique(__obj);
238 return pair<iterator,bool>(reinterpret_cast<const iterator&>(__p.first), __p.second);
239 }
240 template <class _InputIterator>
241 void insert(_InputIterator __f, _InputIterator __l)
242 { _M_ht.insert_unique(__f,__l); }
244 {
246 _M_ht.insert_unique_noresize(__obj);
247 return pair<iterator, bool>(__p.first, __p.second);
248 }
249
250 template <class _KT>
251 iterator find(const _KT& __key) const { return _M_ht.find(__key); }
252 size_type count(const key_type& __key) const { return _M_ht.count(__key); }
253
255 { return _M_ht.equal_range(__key); }
256
257 size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
258 void erase(iterator __it) { _M_ht.erase(__it); }
259 void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
260 void clear() { _M_ht.clear(); }
261
262public:
263 void resize(size_type __hint) { _M_ht.resize(__hint); }
264 size_type bucket_count() const { return _M_ht.bucket_count(); }
265 size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
267 { return _M_ht.elems_in_bucket(__n); }
268
269 static bool _M_equal (const _Self& __x, const _Self& __y) {
270 return _Ht::_M_equal(__x._M_ht,__y._M_ht);
271 }
272
273};
274
275template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
276inline
282
283template <class _Value,
284 class _HashFcn =
285 typename ::BloombergLP::bslstp::HashSelector<_Value>::Type,
286 class _EqualKey = typename bsl::ComparatorSelector<_Value>::Type,
287 class _Alloc = bsl::allocator<_Value> >
289{
290private:
291 typedef hashtable<_Value, _Value, _HashFcn,
292 ::BloombergLP::bslstp::Identity<_Value>,
293 _EqualKey, _Alloc> _Ht;
295
296public:
297 typedef typename _Ht::key_type key_type;
298 typedef typename _Ht::value_type value_type;
299 typedef typename _Ht::hasher hasher;
300 typedef typename _Ht::key_equal key_equal;
301
302 typedef typename _Ht::size_type size_type;
304 typedef typename _Ht::pointer pointer;
306 typedef typename _Ht::reference reference;
308
310 // SunPro bug
312
314
315 hasher hash_funct() const { return _M_ht.hash_funct(); }
316 key_equal key_eq() const { return _M_ht.key_eq(); }
317 allocator_type get_allocator() const { return _M_ht.get_allocator(); }
318
319private:
320 _Ht _M_ht;
321
322public:
324 : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
326 : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
328 : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
329
330 // Constructors with alternative allocator.
331 explicit hash_multiset(const allocator_type& __a)
332 : _M_ht(100, hasher(), key_equal(), __a) {}
334 : _M_ht(__n, hasher(), key_equal(), __a) {}
335 hash_multiset(size_type __n, const hasher& __hf, const allocator_type& __a)
336 : _M_ht(__n, __hf, key_equal(), __a) {}
337
338 hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql)
339 : _M_ht(__n, __hf, __eql, allocator_type()) {}
340 hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
341 const allocator_type& __a)
342 : _M_ht(__n, __hf, __eql, __a) {}
343
344 template <class _InputIterator>
345 hash_multiset(_InputIterator __f, _InputIterator __l)
346 : _M_ht(100, hasher(), key_equal(), allocator_type())
347 { _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); }
352 template <class _InputIterator>
353 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
354 const hasher& __hf)
355 : _M_ht(__n, __hf, key_equal(), allocator_type())
356 { _M_ht.insert_equal(__f, __l); }
357
358 // Constructors with alternative allocator.
359 template <class _InputIterator>
360 hash_multiset(_InputIterator __f, _InputIterator __l,
361 const allocator_type& __a)
362 : _M_ht(100, hasher(), key_equal(), __a)
363 { _M_ht.insert_equal(__f, __l); }
364 template <class _InputIterator>
365 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
366 const allocator_type& __a)
367 : _M_ht(__n, hasher(), key_equal(), __a)
368 { _M_ht.insert_equal(__f, __l); }
369 template <class _InputIterator>
370 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
371 const hasher& __hf, const allocator_type& __a)
372 : _M_ht(__n, __hf, key_equal(), __a)
373 { _M_ht.insert_equal(__f, __l); }
374
375 template <class _InputIterator>
376 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
377 const hasher& __hf, const key_equal& __eql,
378 const allocator_type& __a = allocator_type())
379 : _M_ht(__n, __hf, __eql, __a)
380 { _M_ht.insert_equal(__f, __l); }
381
382 // Copy-construct with alternative allocator.
383 // NOTE: Default copy-constructor is generated by the compiler
384 hash_multiset(const _Self& __x, const allocator_type& __a)
385 : _M_ht(__x._M_ht, __a) { }
386
387public:
388 size_type size() const { return _M_ht.size(); }
389 size_type max_size() const { return _M_ht.max_size(); }
390 bool empty() const { return _M_ht.empty(); }
391 void swap(_Self& hs) { _M_ht.swap(hs._M_ht); }
392
393 iterator begin() const { return _M_ht.begin(); }
394 iterator end() const { return _M_ht.end(); }
395
396public:
398 { return _M_ht.insert_equal(__obj); }
399 template <class _InputIterator>
400 void insert(_InputIterator __f, _InputIterator __l)
401 { _M_ht.insert_equal(__f,__l); }
403 { return _M_ht.insert_equal_noresize(__obj); }
404
405 template <class _KT>
406 iterator find(const _KT& __key) const { return _M_ht.find(__key); }
407
408 size_type count(const key_type& __key) const { return _M_ht.count(__key); }
409
411 { return _M_ht.equal_range(__key); }
412
413 size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
414 void erase(iterator __it) { _M_ht.erase(__it); }
415 void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
416 void clear() { _M_ht.clear(); }
417
418public:
419 void resize(size_type __hint) { _M_ht.resize(__hint); }
420 size_type bucket_count() const { return _M_ht.bucket_count(); }
421 size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
423 { return _M_ht.elems_in_bucket(__n); }
424 static bool _M_equal (const _Self& __x, const _Self& __y) {
425 return _Ht::_M_equal(__x._M_ht,__y._M_ht);
426 }
427};
428
429template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
430inline
436
437template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
438inline bool
444
445template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
446inline bool
449 return !(__hm1 == __hm2);
450}
451
452template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
453inline bool
459
460template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
461inline bool
464 return !(__hm1 == __hm2);
465}
466
467} // close namespace bsl
468
469namespace std {
470
471// Specialization of insert_iterator so that it will work for hash_set
472// and hash_multiset.
473
474template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
475class insert_iterator<bsl::hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > {
476protected:
479public:
481 typedef output_iterator_tag iterator_category;
482 typedef void value_type;
483 typedef void difference_type;
484 typedef void pointer;
485 typedef void reference;
486
487 insert_iterator(_Container& __x) : container(&__x) {}
489 : container(&__x) {}
490 insert_iterator<_Container>&
491 operator=(const typename _Container::value_type& __val) {
492 container->insert(__val);
493 return *this;
494 }
495 insert_iterator<_Container>& operator*() { return *this; }
496 insert_iterator<_Container>& operator++() { return *this; }
497 insert_iterator<_Container>& operator++(int) { return *this; }
498};
499
500template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
501class insert_iterator<bsl::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > {
502protected:
506public:
508 typedef output_iterator_tag iterator_category;
509 typedef void value_type;
510 typedef void difference_type;
511 typedef void pointer;
512 typedef void reference;
513
514 insert_iterator(_Container& __x) : container(&__x) {}
516 : container(&__x) {}
517 insert_iterator<_Container>&
518 operator=(const typename _Container::value_type& __val) {
519 container->insert(__val);
520 return *this;
521 }
522 insert_iterator<_Container>& operator*() { return *this; }
523 insert_iterator<_Container>& operator++() { return *this; }
524 insert_iterator<_Container>& operator++(int) { return *this; }
525};
526
527} // close namespace std
528
529// ============================================================================
530// TYPE TRAITS
531// ============================================================================
532
533// Type traits for STL *ordered* containers:
534//: o An ordered container defines STL iterators.
535//: o An ordered container uses 'bslma' allocators if the parameterized
536//: 'ALLOCATOR' is convertible from 'bslma::Allocator*'.
537
538
539
540namespace bslalg {
541
542template <class _Value,
543 class _HashFcn,
544 class _EqualKey,
545 class _Alloc>
546struct HasStlIterators<bsl::hash_set<_Value, _HashFcn, _EqualKey, _Alloc> >
548{};
549
550template <class _Value,
551 class _HashFcn,
552 class _EqualKey,
553 class _Alloc>
554struct HasStlIterators<bsl::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> >
556{};
557
558} // close namespace bslalg
559
560namespace bslma {
561
562template <class _Value,
563 class _HashFcn,
564 class _EqualKey,
565 class _Alloc>
566struct UsesBslmaAllocator<bsl::hash_set<_Value, _HashFcn, _EqualKey, _Alloc> >
567 : bsl::is_convertible<Allocator*, _Alloc>
568{};
569
570template <class _Value,
571 class _HashFcn,
572 class _EqualKey,
573 class _Alloc>
574struct UsesBslmaAllocator<bsl::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> >
575 : bsl::is_convertible<Allocator*, _Alloc>
576{};
577
578} // close namespace bslma
579
580
581
582#endif /* INCLUDED_BSLSTP_HASHSET */
583
584// Local Variables:
585// mode:C++
586// End:
587
588/** @} */
589/** @} */
590/** @} */
Definition bslma_bslallocator.h:580
Definition bslstp_hashset.h:289
_Ht::allocator_type allocator_type
Definition bslstp_hashset.h:313
hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf)
Definition bslstp_hashset.h:353
hash_multiset(const _Self &__x, const allocator_type &__a)
Definition bslstp_hashset.h:384
hash_multiset(_InputIterator __f, _InputIterator __l)
Definition bslstp_hashset.h:345
hash_multiset(size_type __n, const hasher &__hf)
Definition bslstp_hashset.h:327
hash_multiset(size_type __n, const hasher &__hf, const allocator_type &__a)
Definition bslstp_hashset.h:335
iterator end() const
Definition bslstp_hashset.h:394
allocator_type get_allocator() const
Definition bslstp_hashset.h:317
hash_multiset(const allocator_type &__a)
Definition bslstp_hashset.h:331
_Ht::const_iterator const_iterator
Definition bslstp_hashset.h:309
iterator find(const _KT &__key) const
Definition bslstp_hashset.h:406
pair< iterator, iterator > equal_range(const key_type &__key) const
Definition bslstp_hashset.h:410
size_type size() const
Definition bslstp_hashset.h:388
void erase(iterator __f, iterator __l)
Definition bslstp_hashset.h:415
_Ht::reference reference
Definition bslstp_hashset.h:306
iterator begin() const
Definition bslstp_hashset.h:393
_Ht::size_type size_type
Definition bslstp_hashset.h:302
iterator insert(const value_type &__obj)
Definition bslstp_hashset.h:397
_Ht::difference_type difference_type
Definition bslstp_hashset.h:303
_Ht::value_type value_type
Definition bslstp_hashset.h:298
size_type count(const key_type &__key) const
Definition bslstp_hashset.h:408
hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
Definition bslstp_hashset.h:349
size_type max_size() const
Definition bslstp_hashset.h:389
const_iterator iterator
Definition bslstp_hashset.h:311
hash_multiset(size_type __n, const allocator_type &__a)
Definition bslstp_hashset.h:333
hasher hash_funct() const
Definition bslstp_hashset.h:315
hash_multiset()
Definition bslstp_hashset.h:323
size_type max_bucket_count() const
Definition bslstp_hashset.h:421
static bool _M_equal(const _Self &__x, const _Self &__y)
Definition bslstp_hashset.h:424
iterator insert_noresize(const value_type &__obj)
Definition bslstp_hashset.h:402
_Ht::const_pointer const_pointer
Definition bslstp_hashset.h:305
size_type erase(const key_type &__key)
Definition bslstp_hashset.h:413
_Ht::const_reference const_reference
Definition bslstp_hashset.h:307
void swap(_Self &hs)
Definition bslstp_hashset.h:391
bool empty() const
Definition bslstp_hashset.h:390
void resize(size_type __hint)
Definition bslstp_hashset.h:419
_Ht::key_equal key_equal
Definition bslstp_hashset.h:300
key_equal key_eq() const
Definition bslstp_hashset.h:316
void clear()
Definition bslstp_hashset.h:416
hash_multiset(size_type __n, const hasher &__hf, const key_equal &__eql)
Definition bslstp_hashset.h:338
hash_multiset(_InputIterator __f, _InputIterator __l, const allocator_type &__a)
Definition bslstp_hashset.h:360
void insert(_InputIterator __f, _InputIterator __l)
Definition bslstp_hashset.h:400
_Ht::key_type key_type
Definition bslstp_hashset.h:297
hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, const allocator_type &__a)
Definition bslstp_hashset.h:365
size_type bucket_count() const
Definition bslstp_hashset.h:420
hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf, const key_equal &__eql, const allocator_type &__a=allocator_type())
Definition bslstp_hashset.h:376
size_type elems_in_bucket(size_type __n) const
Definition bslstp_hashset.h:422
hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf, const allocator_type &__a)
Definition bslstp_hashset.h:370
void erase(iterator __it)
Definition bslstp_hashset.h:414
hash_multiset(size_type __n)
Definition bslstp_hashset.h:325
_Ht::pointer pointer
Definition bslstp_hashset.h:304
_Ht::hasher hasher
Definition bslstp_hashset.h:299
hash_multiset(size_type __n, const hasher &__hf, const key_equal &__eql, const allocator_type &__a)
Definition bslstp_hashset.h:340
Definition bslstp_hashset.h:131
size_type size() const
Definition bslstp_hashset.h:226
hash_set(_InputIterator __f, _InputIterator __l)
Definition bslstp_hashset.h:185
_Ht::value_type value_type
Definition bslstp_hashset.h:140
iterator begin() const
Definition bslstp_hashset.h:231
void insert(_InputIterator __f, _InputIterator __l)
Definition bslstp_hashset.h:241
_Ht::const_reference const_reference
Definition bslstp_hashset.h:149
_Ht::reference reference
Definition bslstp_hashset.h:148
hash_set(size_type __n, const hasher &__hf)
Definition bslstp_hashset.h:169
void erase(iterator __it)
Definition bslstp_hashset.h:258
hash_set(size_type __n, const hasher &__hf, const allocator_type &__a)
Definition bslstp_hashset.h:177
iterator end() const
Definition bslstp_hashset.h:232
pair< iterator, iterator > equal_range(const key_type &__key) const
Definition bslstp_hashset.h:254
_Ht::key_type key_type
Definition bslstp_hashset.h:139
_Ht::difference_type difference_type
Definition bslstp_hashset.h:145
hash_set(size_type __n, const allocator_type &__a)
Definition bslstp_hashset.h:175
hasher hash_funct() const
Definition bslstp_hashset.h:157
size_type max_size() const
Definition bslstp_hashset.h:227
bool empty() const
Definition bslstp_hashset.h:228
hash_set(size_type __n)
Definition bslstp_hashset.h:167
_Ht::pointer pointer
Definition bslstp_hashset.h:146
size_type max_bucket_count() const
Definition bslstp_hashset.h:265
pair< iterator, bool > insert(const value_type &__obj)
Definition bslstp_hashset.h:235
_Ht::hasher hasher
Definition bslstp_hashset.h:141
_Ht::const_iterator const_iterator
Definition bslstp_hashset.h:152
size_type elems_in_bucket(size_type __n) const
Definition bslstp_hashset.h:266
hash_set(_InputIterator __f, _InputIterator __l, const allocator_type &__a)
Definition bslstp_hashset.h:200
hash_set(size_type __n, const hasher &__hf, const key_equal &__eql, const allocator_type &__a=allocator_type())
Definition bslstp_hashset.h:180
size_type erase(const key_type &__key)
Definition bslstp_hashset.h:257
_Ht::key_equal key_equal
Definition bslstp_hashset.h:142
allocator_type get_allocator() const
Definition bslstp_hashset.h:159
void resize(size_type __hint)
Definition bslstp_hashset.h:263
static bool _M_equal(const _Self &__x, const _Self &__y)
Definition bslstp_hashset.h:269
size_type count(const key_type &__key) const
Definition bslstp_hashset.h:252
_Ht::const_pointer const_pointer
Definition bslstp_hashset.h:147
hash_set(const _Self &__x, const allocator_type &__a)
Definition bslstp_hashset.h:222
hash_set(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf)
Definition bslstp_hashset.h:193
void swap(_Self &__hs)
Definition bslstp_hashset.h:229
hash_set(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf, const key_equal &__eql, const allocator_type &__a=allocator_type())
Definition bslstp_hashset.h:214
void clear()
Definition bslstp_hashset.h:260
key_equal key_eq() const
Definition bslstp_hashset.h:158
hash_set(_InputIterator __f, _InputIterator __l, size_type __n, const allocator_type &__a)
Definition bslstp_hashset.h:204
hash_set(const allocator_type &__a)
Definition bslstp_hashset.h:173
hash_set(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf, const allocator_type &__a)
Definition bslstp_hashset.h:208
_Ht::size_type size_type
Definition bslstp_hashset.h:144
size_type bucket_count() const
Definition bslstp_hashset.h:264
pair< iterator, bool > insert_noresize(const value_type &__obj)
Definition bslstp_hashset.h:243
void erase(iterator __f, iterator __l)
Definition bslstp_hashset.h:259
iterator find(const _KT &__key) const
Definition bslstp_hashset.h:251
hash_set()
Definition bslstp_hashset.h:165
_Ht::allocator_type allocator_type
Definition bslstp_hashset.h:155
const_iterator iterator
Definition bslstp_hashset.h:153
hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
Definition bslstp_hashset.h:189
Definition bslstp_hashtable.h:230
hasher hash_funct() const
Definition bslstp_hashtable.h:247
_HF hasher
Definition bslstp_hashtable.h:236
value_type & reference
Definition bslstp_hashtable.h:243
ptrdiff_t difference_type
Definition bslstp_hashtable.h:240
allocator_type get_allocator() const
Definition bslstp_hashtable.h:281
_Key key_type
Definition bslstp_hashtable.h:234
static bool _M_equal(const hashtable< _Val, _Key, _HF, _ExK, _EqK, _All > &, const hashtable< _Val, _Key, _HF, _ExK, _EqK, _All > &)
Definition bslstp_hashtable.h:703
key_equal key_eq() const
Definition bslstp_hashtable.h:248
value_type * pointer
Definition bslstp_hashtable.h:241
const value_type & const_reference
Definition bslstp_hashtable.h:244
_EqK key_equal
Definition bslstp_hashtable.h:237
_Val value_type
Definition bslstp_hashtable.h:235
const value_type * const_pointer
Definition bslstp_hashtable.h:242
size_t size_type
Definition bslstp_hashtable.h:239
_Alloc_traits< _Val, _All >::allocator_type allocator_type
Definition bslstp_hashtable.h:280
Definition bslstl_pair.h:1210
insert_iterator< _Container > & operator++()
Definition bslstp_hashset.h:523
insert_iterator< _Container > & operator=(const typename _Container::value_type &__val)
Definition bslstp_hashset.h:518
insert_iterator< _Container > & operator++(int)
Definition bslstp_hashset.h:524
insert_iterator< _Container > & operator*()
Definition bslstp_hashset.h:522
bsl::hash_multiset< _Value, _HashFcn, _EqualKey, _Alloc > _Container
Definition bslstp_hashset.h:503
insert_iterator(_Container &__x, typename _Container::iterator)
Definition bslstp_hashset.h:515
output_iterator_tag iterator_category
Definition bslstp_hashset.h:508
insert_iterator< _Container > & operator++()
Definition bslstp_hashset.h:496
bsl::hash_set< _Value, _HashFcn, _EqualKey, _Alloc > _Container
Definition bslstp_hashset.h:477
insert_iterator(_Container &__x)
Definition bslstp_hashset.h:487
insert_iterator< _Container > & operator=(const typename _Container::value_type &__val)
Definition bslstp_hashset.h:491
insert_iterator< _Container > & operator*()
Definition bslstp_hashset.h:495
output_iterator_tag iterator_category
Definition bslstp_hashset.h:481
insert_iterator(_Container &__x, typename _Container::iterator)
Definition bslstp_hashset.h:488
insert_iterator< _Container > & operator++(int)
Definition bslstp_hashset.h:497
Definition bdlb_printmethods.h:283
Definition bdlc_flathashmap.h:1805
Definition balxml_encoderoptions.h:68
Definition bdldfp_decimal.h:5188
TYPE first
Definition bslstl_pair.h:605
TYPE second
Definition bslstl_pair.h:908
Definition bslstp_hashtable.h:146
Definition bslstl_equalto.h:311
Definition bslmf_isconvertible.h:867
Definition bslalg_hasstliterators.h:99
Definition bslma_usesbslmaallocator.h:343