BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl_unorderedmultiset_cpp03.h
Go to the documentation of this file.
1/// @file bslstl_unorderedmultiset_cpp03.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslstl_unorderedmultiset_cpp03.h -*-C++-*-
8
9// Automatically generated file. **DO NOT EDIT**
10
11#ifndef INCLUDED_BSLSTL_UNORDEREDMULTISET_CPP03
12#define INCLUDED_BSLSTL_UNORDEREDMULTISET_CPP03
13
14/// @defgroup bslstl_unorderedmultiset_cpp03 bslstl_unorderedmultiset_cpp03
15/// @brief Provide C++03 implementation for bslstl_unorderedmultiset.h
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslstl
19/// @{
20/// @addtogroup bslstl_unorderedmultiset_cpp03
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslstl_unorderedmultiset_cpp03-purpose"> Purpose</a>
25/// * <a href="#bslstl_unorderedmultiset_cpp03-classes"> Classes </a>
26/// * <a href="#bslstl_unorderedmultiset_cpp03-description"> Description </a>
27///
28/// # Purpose {#bslstl_unorderedmultiset_cpp03-purpose}
29/// Provide C++03 implementation for bslstl_unorderedmultiset.h
30///
31/// # Classes {#bslstl_unorderedmultiset_cpp03-classes}
32/// See bslstl_unorderedmultiset.h for list of classes
33///
34/// @see bslstl_unorderedmultiset
35///
36/// # Description {#bslstl_unorderedmultiset_cpp03-description}
37/// This component is the C++03 translation of a C++11 component,
38/// generated by the 'sim_cpp11_features.pl' program. If the original header
39/// contains any specially delimited regions of C++11 code, then this generated
40/// file contains the C++03 equivalent, i.e., with variadic templates expanded
41/// and rvalue-references replaced by 'bslmf::MovableRef' objects. The header
42/// code in this file is designed to be '#include'd into the original header
43/// when compiling with a C++03 compiler. If there are no specially delimited
44/// regions of C++11 code, then this header contains no code and is not
45/// '#include'd in the original header.
46///
47/// Generated on Sun Sep 1 18:48:19 2024
48/// Command line: sim_cpp11_features.pl bslstl_unorderedmultiset.h
49/// @}
50/** @} */
51/** @} */
52
53/** @addtogroup bsl
54 * @{
55 */
56/** @addtogroup bslstl
57 * @{
58 */
59/** @addtogroup bslstl_unorderedmultiset_cpp03
60 * @{
61 */
62
63#ifdef COMPILING_BSLSTL_UNORDEREDMULTISET_H
64
65namespace bsl {
66
67 // ========================
68 // class unordered_multiset
69 // ========================
70
71/// This class template implements a value-semantic container type holding
72/// an unordered multiset of values (of template parameter type `KEY`).
73///
74/// This class:
75/// * supports a complete set of *value-semantic* operations
76/// - except for BDEX serialization
77/// * is *exception-neutral* (agnostic except for the `at` method)
78/// * is *alias-safe*
79/// * is `const` *thread-safe*
80/// For terminology see @ref bsldoc_glossary .
81template <class KEY,
82 class HASH = bsl::hash<KEY>,
83 class EQUAL = bsl::equal_to<KEY>,
84 class ALLOCATOR = bsl::allocator<KEY> >
85class unordered_multiset
86{
87
88 private:
89
90 // PRIVATE TYPE
91
92 /// This typedef is an alias for the allocator traits type associated
93 /// with this container.
94 typedef bsl::allocator_traits<ALLOCATOR> AllocatorTraits;
95
96 /// This typedef is an alias for the type of values maintained by this
97 /// unordered multiset.
98 typedef KEY ValueType;
99
100 /// This typedef is an alias for the policy used internally by this
101 /// container to extract the `KEY` value from the values maintained by
102 /// this unordered multiset.
103 typedef ::BloombergLP::bslstl::UnorderedSetKeyConfiguration<ValueType>
104 ListConfiguration;
105
106 /// This typedef is an alias for the template instantiation of the
107 /// underlying `bslstl::HashTable` used to implement this unordered
108 /// multiset.
109 typedef ::BloombergLP::bslstl::HashTable<ListConfiguration,
110 HASH,
111 EQUAL,
112 ALLOCATOR> HashTable;
113
114 /// This typedef is an alias for the type of links maintained by the
115 /// linked list of elements held by the underlying `bslstl::HashTable`.
116 typedef ::BloombergLP::bslalg::BidirectionalLink HashTableLink;
117
118 /// This typedef is a convenient alias for the utility associated with
119 /// movable references.
120 typedef BloombergLP::bslmf::MovableRefUtil MoveUtil;
121
122 // FRIENDS
123 template <class KEY2,
124 class HASH2,
125 class EQUAL2,
126 class ALLOCATOR2>
127 friend bool operator==(
128 const unordered_multiset<KEY2, HASH2, EQUAL2, ALLOCATOR2>&,
129 const unordered_multiset<KEY2, HASH2, EQUAL2, ALLOCATOR2>&);
130
131 public:
132 // PUBLIC TYPES
133 typedef KEY key_type;
134 typedef KEY value_type;
135 typedef HASH hasher;
136 typedef EQUAL key_equal;
137 typedef ALLOCATOR allocator_type;
138 typedef value_type& reference;
139 typedef const value_type& const_reference;
140
141 typedef typename AllocatorTraits::size_type size_type;
143 typedef typename AllocatorTraits::pointer pointer;
145
146 typedef ::BloombergLP::bslstl::HashTableIterator<
148
149 typedef ::BloombergLP::bslstl::HashTableBucketIterator<
151
152 typedef iterator const_iterator;
154
155 public:
156 // TRAITS
159 ::BloombergLP::bslmf::IsBitwiseMoveable,
160 ::BloombergLP::bslmf::IsBitwiseMoveable<HashTable>::value);
161
162 private:
163 // DATA
164 HashTable d_impl;
165
166 public:
167 // CREATORS
168
170 explicit unordered_multiset(size_type initialNumBuckets,
171 const HASH& hashFunction = HASH(),
172 const EQUAL& keyEqual = EQUAL(),
173 const ALLOCATOR& basicAllocator = ALLOCATOR());
174 unordered_multiset(size_type initialNumBuckets,
175 const HASH& hashFunction,
176 const ALLOCATOR& basicAllocator);
177 unordered_multiset(size_type initialNumBuckets,
178 const ALLOCATOR& basicAllocator);
179 /// Create an empty unordered multiset. Optionally specify an
180 /// `initialNumBuckets` indicating the initial size of the array of
181 /// buckets of this container. If `initialNumBuckets` is not supplied,
182 /// a single bucket is used. Optionally specify a `hashFunction` used
183 /// to generate the hash values for the keys contained in this unordered
184 /// multiset. If `hashFunction` is not supplied, a default-constructed
185 /// object of the (template parameter) type `HASH` is used. Optionally
186 /// specify a key-equality functor `keyEqual` used to verify that two
187 /// keys are equivalent. If `keyEqual` is not supplied, a
188 /// default-constructed object of the (template parameter) type `EQUAL`
189 /// is used. Optionally specify a `basicAllocator` used to supply
190 /// memory. If `basicAllocator` is not supplied, a default-constructed
191 /// object of the (template parameter) type `ALLOCATOR` is used. If the
192 /// type `ALLOCATOR` is `bsl::allocator` (the default), then
193 /// `basicAllocator`, if supplied, shall be convertible to
194 /// `bslma::Allocator *`. If the type `ALLOCATOR` is `bsl::allocator`
195 /// and `basicAllocator` is not supplied, the currently installed
196 /// default allocator is used.
197 explicit unordered_multiset(const ALLOCATOR& basicAllocator);
198
199 /// Create an unordered multiset having the same value as the specified
200 /// `original` object. Use a copy of `original.hash_function()` to
201 /// generate hash values for the keys contained in this unordered
202 /// multiset. Use a copy of `original.key_eq()` to verify that two keys
203 /// are equivalent. Use the allocator returned by
204 /// `bsl::allocator_traits<ALLOCATOR>::
205 /// select_on_container_copy_construction(original.get_allocator())` to
206 /// allocate memory. This method requires that the (template parameter)
207 /// type `KEY` be `copy-insertable` into this unordered multiset (see
208 /// {Requirements on `KEY`}).
209 unordered_multiset(const unordered_multiset& original);
210
211 /// Create an unordered multiset having the same value as the specified
212 /// `original` object by moving (in constant time) the contents of
213 /// `original` to the new unordered multiset. Use a copy of
214 /// `original.hash_function()` to generate hash values for the keys
215 /// contained in this unordered multiset. Use a copy of
216 /// `original.key_eq()` to verify that two keys are equivalent. The
217 /// allocator associated with `original` is propagated for use in the
218 /// newly-created unordered multiset. `original` is left in a valid but
219 /// unspecified state.
221 BloombergLP::bslmf::MovableRef<unordered_multiset> original);
222
223 /// Create an unordered multiset having the same value as the specified
224 /// `original` object that uses the specified `basicAllocator` to supply
225 /// memory. Use a copy of `original.hash_function()` to generate hash
226 /// values for the keys contained in this unordered multiset. Use a
227 /// copy of `original.key_eq()` to verify that two keys are equivalent.
228 /// This method requires that the (template parameter) type `KEY` be
229 /// `copy-insertable` into this unordered multiset (see {Requirements on
230 /// `KEY`}). Note that a `bslma::Allocator *` can be supplied for
231 /// `basicAllocator` if the (template parameter) type `ALLOCATOR` is
232 /// `bsl::allocator` (the default).
234 const unordered_multiset& original,
235 const typename type_identity<ALLOCATOR>::type& basicAllocator);
236
237 /// Create an unordered multiset having the same value as the specified
238 /// `original` object that uses the specified `basicAllocator` to supply
239 /// memory. The contents of `original` are moved (in constant time) to
240 /// the new unordered multiset if `basicAllocator ==
241 /// original.get_allocator()`, and are move-inserted (in linear time)
242 /// using `basicAllocator` otherwise. `original` is left in a valid but
243 /// unspecified state. Use a copy of `original.hash_function()` to
244 /// generate hash values for the keys contained in this unordered
245 /// multiset. Use a copy of `original.key_eq()` to verify that two keys
246 /// are equivalent. This method requires that the (template parameter)
247 /// type `KEY` be `move-insertable` into this unordered multiset (see
248 /// {Requirements on `KEY`}). Note that a `bslma::Allocator *` can be
249 /// supplied for `basicAllocator` if the (template parameter) type
250 /// `ALLOCATOR` is `bsl::allocator` (the default).
252 BloombergLP::bslmf::MovableRef<unordered_multiset> original,
253 const typename type_identity<ALLOCATOR>::type& basicAllocator);
254
255 /// Create an unordered multiset, and insert each `value_type` object in
256 /// the sequence starting at the specified `first` element, and ending
257 /// immediately before the specified `last` element. Optionally specify
258 /// an `initialNumBuckets` indicating the initial size of the array of
259 /// buckets of this container. If `initialNumBuckets` is not supplied,
260 /// a single bucket is used. Optionally specify a `hashFunction` used
261 /// to generate hash values for the keys contained in this unordered
262 /// multiset. If `hashFunction` is not supplied, a default-constructed
263 /// object of (template parameter) type `HASH` is used. Optionally
264 /// specify a key-equality functor `keyEqual` used to verify that two
265 /// keys are equivalent. If `keyEqual` is not supplied, a
266 /// default-constructed object of (template parameter) type `EQUAL` is
267 /// used. Optionally specify a `basicAllocator` used to supply memory.
268 /// If `basicAllocator` is not supplied, a default-constructed object of
269 /// the (template parameter) type `ALLOCATOR` is used. If the type
270 /// `ALLOCATOR` is `bsl::allocator` and `basicAllocator` is not
271 /// supplied, the currently installed default allocator is used to
272 /// supply memory. The (template parameter) type `INPUT_ITERATOR` shall
273 /// meet the requirements of an input iterator defined in the C++11
274 /// standard [24.2.3] providing access to values of a type convertible
275 /// to `value_type`, and `value_type` must be `emplace-constructible`
276 /// from `*i` into this unordered multiset, where `i` is a
277 /// dereferenceable iterator in the range `[first .. last)` (see
278 /// {Requirements on `KEY`}). The behavior is undefined unless `first`
279 /// and `last` refer to a sequence of valid values where `first` is at a
280 /// position at or before `last`. Note that a `bslma::Allocator *` can
281 /// be supplied for `basicAllocator` if the type `ALLOCATOR` is
282 /// `bsl::allocator` (the default).
283 template <class INPUT_ITERATOR>
284 unordered_multiset(INPUT_ITERATOR first,
285 INPUT_ITERATOR last,
286 size_type initialNumBuckets = 0,
287 const HASH& hashFunction = HASH(),
288 const EQUAL& keyEqual = EQUAL(),
289 const ALLOCATOR& basicAllocator = ALLOCATOR());
290 template <class INPUT_ITERATOR>
291 unordered_multiset(INPUT_ITERATOR first,
292 INPUT_ITERATOR last,
293 size_type initialNumBuckets,
294 const HASH& hashFunction,
295 const ALLOCATOR& basicAllocator);
296 template <class INPUT_ITERATOR>
297 unordered_multiset(INPUT_ITERATOR first,
298 INPUT_ITERATOR last,
299 size_type initialNumBuckets,
300 const ALLOCATOR& basicAllocator);
301 template <class INPUT_ITERATOR>
302 unordered_multiset(INPUT_ITERATOR first,
303 INPUT_ITERATOR last,
304 const ALLOCATOR& basicAllocator);
305
306#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
307# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
308 template <
309 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
310 class = bsl::enable_if_t<
311 std::is_invocable_v<EQUAL, const KEY &, const KEY &>>,
312 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
313 >
314# endif
316 std::initializer_list<KEY> values,
317 size_type initialNumBuckets = 0,
318 const HASH& hashFunction = HASH(),
319 const EQUAL& keyEqual = EQUAL(),
320 const ALLOCATOR& basicAllocator = ALLOCATOR());
321# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
322 template <
323 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
324 class = bsl::enable_if_t<bsl::IsStdAllocator<ALLOCATOR>::value>
325 >
326# endif
327 unordered_multiset(std::initializer_list<KEY> values,
328 size_type initialNumBuckets,
329 const HASH& hashFunction,
330 const ALLOCATOR& basicAllocator);
331# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
332 template <class = bsl::enable_if_t<bsl::IsStdAllocator<ALLOCATOR>::value>>
333# endif
334 unordered_multiset(std::initializer_list<KEY> values,
335 size_type initialNumBuckets,
336 const ALLOCATOR& basicAllocator);
337# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
338 /// Create an unordered multiset and insert each `value_type` object in
339 /// the specified `values` initializer list. Optionally specify an
340 /// `initialNumBuckets` indicating the initial size of the array of
341 /// buckets of this container. If `initialNumBuckets` is not supplied,
342 /// a single bucket is used. Optionally specify a `hashFunction` used
343 /// to generate the hash values for the keys contained in this unordered
344 /// multiset. If `hashFunction` is not supplied, a default-constructed
345 /// object of the (template parameter) type `HASH` is used. Optionally
346 /// specify a key-equality functor `keyEqual` used to verify that two
347 /// keys are equivalent. If `keyEqual` is not supplied, a
348 /// default-constructed object of the (template parameter) type `EQUAL`
349 /// is used. Optionally specify a `basicAllocator` used to supply
350 /// memory. If `basicAllocator` is not supplied, a default-constructed
351 /// object of the (template parameter) type `ALLOCATOR` is used. If the
352 /// type `ALLOCATOR` is `bsl::allocator` and `basicAllocator` is not
353 /// supplied, the currently installed default allocator is used to
354 /// supply memory. This method requires that the (template parameter)
355 /// type `KEY` be `copy-insertable` into this unordered multiset (see
356 /// {Requirements on `KEY`}). Note that a `bslma::Allocator *` can be
357 /// supplied for `basicAllocator` if the type `ALLOCATOR` is
358 /// `bsl::allocator` (the default).
359 template <class = bsl::enable_if_t<bsl::IsStdAllocator<ALLOCATOR>::value>>
360# endif
361 unordered_multiset(std::initializer_list<KEY> values,
362 const ALLOCATOR& basicAllocator);
363#endif
364
365 /// Destroy this object.
367
368 // MANIPULATORS
369
370 /// Assign to this object the value, hash function, and equality
371 /// comparator of the specified `rhs` object, propagate to this object
372 /// the allocator of `rhs` if the `ALLOCATOR` type has trait
373 /// `propagate_on_container_copy_assignment`, and return a reference
374 /// providing modifiable access to this object. If an exception is
375 /// thrown, `*this` is left in a valid but unspecified state. This
376 /// method requires that the (template parameter) type `KEY` be both
377 /// `copy-assignable` and `copy-insertable` into this unordered multiset
378 /// (see {Requirements on `KEY`}).
379 unordered_multiset& operator=(const unordered_multiset& rhs);
380
381 /// Assign to this object the value, hash function, and equality
382 /// comparator of the specified `rhs` object, propagate to this object
383 /// the allocator of `rhs` if the `ALLOCATOR` type has trait
384 /// `propagate_on_container_move_assignment`, and return a reference
385 /// providing modifiable access to this object. The contents of `rhs`
386 /// are moved (in constant time) to this unordered multiset if
387 /// `get_allocator() == rhs.get_allocator()` (after accounting for the
388 /// aforementioned trait); otherwise, all elements in this unordered
389 /// multiset are either destroyed or move-assigned to and each
390 /// additional element in `rhs` is move-inserted into this unordered
391 /// multiset. `rhs` is left in a valid but unspecified state, and if an
392 /// exception is thrown, `*this` is left in a valid but unspecified
393 /// state. This method requires that the (template parameter) type
394 /// `KEY` be both `move-assignable` and `move-insertable` into this
395 /// unordered multiset (see {Requirements on `KEY`}).
397 operator=(BloombergLP::bslmf::MovableRef<unordered_multiset> rhs)
399 AllocatorTraits::is_always_equal::value
400 && std::is_nothrow_move_assignable<HASH>::value
401 && std::is_nothrow_move_assignable<EQUAL>::value);
402
403#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
404 /// Assign to this object the value resulting from first clearing this
405 /// unordered multiset and then inserting each `value_type` object in
406 /// the specified `values` initializer list, and return a reference
407 /// providing modifiable access to this object. This method requires
408 /// that the (template parameter) type `KEY` be `copy-insertable` into
409 /// this unordered multiset (see {Requirements on `KEY`}).
410 unordered_multiset& operator=(std::initializer_list<KEY> values);
411#endif
412
413 /// Return an iterator providing modifiable access to the first
414 /// `value_type` object (in the sequence of `value_type` objects)
415 /// maintained by this unordered multiset, or the `end` iterator if this
416 /// unordered multiset is empty.
418
419 /// Return an iterator providing modifiable access to the past-the-end
420 /// element in the sequence of `value_type` objects maintained by this
421 /// unordered multiset.
423
424 /// Return a local iterator providing modifiable access to the first
425 /// `value_type` object in the sequence of `value_type` objects of the
426 /// bucket having the specified `index`, in the array of buckets
427 /// maintained by this unordered multiset, or the `end(index)`
428 /// otherwise.
429 local_iterator begin(size_type index);
430
431 /// Return a local iterator providing modifiable access to the
432 /// past-the-end element in the sequence of `value_type` objects of the
433 /// bucket having the specified `index`, in the array of buckets
434 /// maintained by this unordered multiset.
435 local_iterator end(size_type index);
436
437 /// Remove all entries from this unordered multiset. Note that the
438 /// container is empty after this call, but allocated memory may be
439 /// retained for future use.
441
442 /// Return a pair of iterators providing modifiable access to the
443 /// sequence of `value_type` objects in this unordered multiset
444 /// equivalent to the specified `key`, where the first iterator is
445 /// positioned at the start of the sequence, and the second is
446 /// positioned one past the end of the sequence. If this unordered
447 /// multiset contains no `value_type` objects equivalent to the `key`,
448 /// then the two returned iterators will have the same value. The
449 /// behavior is undefined unless `key` is equivalent to the elements of
450 /// at most one equivalent-key group in this unordered multiset.
451 template <class LOOKUP_KEY>
452 typename enable_if<
453 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
454 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
455 pair<iterator, iterator> >::type
456 equal_range(const LOOKUP_KEY& key)
457 {
458 // Note: implemented inline due to Sun CC compilation error.
459 typedef bsl::pair<iterator, iterator> ResultType;
460 HashTableLink *first;
461 HashTableLink *last;
462 d_impl.findRange(&first, &last, key);
463 return ResultType(iterator(first), iterator(last));
464 }
465
466 /// Return a pair of iterators providing modifiable access to the
467 /// sequence of `value_type` objects in this unordered multiset
468 /// equivalent to the specified `key`, where the first iterator is
469 /// positioned at the start of the sequence, and the second is
470 /// positioned one past the end of the sequence. If this unordered
471 /// multiset contains no `value_type` objects equivalent to the `key`,
472 /// then the two returned iterators will have the same value.
473 pair<iterator, iterator> equal_range(const key_type& key);
474
475 /// Remove from this unordered multiset all `value_type` objects that
476 /// are equivalent to the specified `key`, if they exist, and return the
477 /// number of object erased; otherwise, if there are no `value_type`
478 /// objects equivalent to `key`, return 0 with no other effect. This
479 /// method invalidates only iterators and references to the removed
480 /// element and previously saved values of the `end()` iterator, and
481 /// preserves the relative order of the elements not removed.
482 size_type erase(const key_type& key);
483
484 /// Remove from this unordered multiset the `value_type` object at the
485 /// specified `position`, and return an iterator referring to the
486 /// element immediately following the removed element, or to the
487 /// past-the-end position if the removed element was the last element in
488 /// the sequence of elements maintained by this unordered multiset.
489 /// This method invalidates only iterators and references to the removed
490 /// element and previously saved values of the `end()` iterator, and
491 /// preserves the relative order of the elements not removed. The
492 /// behavior is undefined unless `position` refers to a `value_type`
493 /// object in this unordered multiset.
494 iterator erase(const_iterator position);
495
496 /// Remove from unordered multiset the `value_type` objects starting at
497 /// the specified `first` position up to, but not including the
498 /// specified `last` position, and return `last`. This method
499 /// invalidates only iterators and references to the removed element and
500 /// previously saved values of the `end()` iterator, and preserves the
501 /// relative order of the elements not removed. The behavior is
502 /// undefined unless `first` and `last` either refer to elements in this
503 /// unordered multiset or are the `end` iterator, and the `first`
504 /// position is at or before the `last` position in the sequence
505 /// provided by this container.
507
508 /// Return an iterator providing modifiable access to the first
509 /// `value_type` object in the sequence of all the value elements of
510 /// this unordered multiset equivalent to the specified `key`, if such
511 /// entries exist, and the past-the-end (`end`) iterator otherwise. The
512 /// behavior is undefined unless `key` is equivalent to the elements of
513 /// at most one equivalent-key group in this unordered multiset.
514 template <class LOOKUP_KEY>
515 typename enable_if<
516 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
517 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
518 iterator>::type
519 find(const LOOKUP_KEY& key)
520 {
521 // Note: implemented inline due to Sun CC compilation error.
522 return iterator(d_impl.find(key));
523 }
524
525 /// Return an iterator providing modifiable access to the first
526 /// `value_type` object in the sequence of all the value elements of
527 /// this unordered multiset equivalent to the specified `key`, if such
528 /// entries exist, and the past-the-end (`end`) iterator otherwise.
529 iterator find(const key_type& key);
530
531 /// Insert the specified `value` into this unordered multiset. If one
532 /// or more keys equivalent to `value` already exist in this unordered
533 /// multiset, this method is guaranteed to insert `value` in a position
534 /// contiguous to one of those equivalent keys. Return an iterator
535 /// referring to the newly inserted `value_type` object that is
536 /// equivalent to `value`. Note that this method requires that the
537 /// (template parameter) type `KEY` be `copy-insertable` into this
538 /// unordered multiset (see {Requirements on `KEY`}).
539 iterator insert(const value_type& value);
540
541 /// Insert the specified `value` into this unordered multiset. If one
542 /// or more keys equivalent to `value` already exist in this unordered
543 /// multiset, this method is guaranteed to insert `value` in a position
544 /// contiguous to one of those equivalent keys. Return an iterator
545 /// referring to the newly inserted `value_type` object that is
546 /// equivalent to `value`. This method requires that the (template
547 /// parameter) type `KEY` be `move-insertable` into this unordered
548 /// multiset (see {Requirements on `KEY`}).
549 iterator insert(BloombergLP::bslmf::MovableRef<value_type> value);
550
551 /// Insert the specified `value` into this unordered multiset (in
552 /// constant time if the specified `hint` refers to an element in this
553 /// container equivalent to `value`). If one or more keys equivalent to
554 /// `value` already exist in this unordered multiset, this method is
555 /// guaranteed to insert `value` in a position contiguous to one of
556 /// those equivalent keys. Return an iterator referring to the newly
557 /// inserted `value_type` object that is equivalent to `value`. If
558 /// `hint` does not refer to an element in this container equivalent to
559 /// `value`, this operation has worst case `O[N]` and average case
560 /// constant-time complexity, where `N` is the size of this unordered
561 /// multiset. This method requires that the (template parameter) type
562 /// `KEY` be `copy-insertable` into this unordered multiset (see
563 /// {Requirements on `KEY`}). The behavior is undefined unless `hint`
564 /// is an iterator in the range `[begin() .. end()]` (both endpoints
565 /// included).
566 iterator insert(const_iterator hint, const value_type& value);
567
568 /// Insert the specified `value` into this unordered multiset (in
569 /// constant time if the specified `hint` refers to an element in this
570 /// container equivalent to `value`). If one or more keys equivalent to
571 /// `value` already exist in this unordered multiset, this method is
572 /// guaranteed to insert `value` in a position contiguous to one of
573 /// those equivalent keys. Return an iterator referring to the newly
574 /// inserted `value_type` object that is equivalent to `value`. If
575 /// `hint` does not refer to an element in this container equivalent to
576 /// `value`, this operation has worst case `O[N]` and average case
577 /// constant-time complexity, where `N` is the size of this unordered
578 /// multiset. This method requires that the (template parameter) type
579 /// `KEY` be `move-insertable` into this unordered multiset (see
580 /// {Requirements on `KEY`}). The behavior is undefined unless `hint`
581 /// is an iterator in the range `[begin() .. end()]` (both endpoints
582 /// included).
584 BloombergLP::bslmf::MovableRef<value_type> value);
585
586 /// Insert into this unordered multiset the value of each `value_type`
587 /// object in the range starting at the specified `first` iterator and
588 /// ending immediately before the specified `last` iterator. The
589 /// (template parameter) type `INPUT_ITERATOR` shall meet the
590 /// requirements of an input iterator defined in the C++11 standard
591 /// [24.2.3] providing access to values of a type convertible to
592 /// `value_type`, and `value_type` must be `emplace-constructible` from
593 /// `*i` into this unordered multiset, where `i` is a dereferenceable
594 /// iterator in the range `[first .. last)` (see {Requirements on
595 /// `KEY`}). The behavior is undefined unless `first` and `last` refer
596 /// to a sequence of valid values where `first` is at a position at or
597 /// before `last`.
598 template <class INPUT_ITERATOR>
599 void insert(INPUT_ITERATOR first, INPUT_ITERATOR last);
600
601#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
602 /// Insert into this unordered multiset the value of each `value_type`
603 /// object in the specified `values` initializer list. This method
604 /// requires that the (template parameter) type `KEY` be
605 /// `copy-insertable` into this unordered multiset (see {Requirements on
606 /// `KEY`}).
607 void insert(std::initializer_list<KEY> values);
608#endif
609
610#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
611// {{{ BEGIN GENERATED CODE
612// Command line: sim_cpp11_features.pl bslstl_unorderedmultiset.h
613#ifndef BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT
614#define BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT 10
615#endif
616#ifndef BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A
617#define BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT
618#endif
619#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 0
621#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 0
622
623#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 1
624 template <class Args_01>
626#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 1
627
628#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 2
629 template <class Args_01,
630 class Args_02>
632 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02);
633#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 2
634
635#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 3
636 template <class Args_01,
637 class Args_02,
638 class Args_03>
640 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
641 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03);
642#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 3
643
644#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 4
645 template <class Args_01,
646 class Args_02,
647 class Args_03,
648 class Args_04>
650 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
651 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
652 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04);
653#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 4
654
655#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 5
656 template <class Args_01,
657 class Args_02,
658 class Args_03,
659 class Args_04,
660 class Args_05>
662 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
663 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
664 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
665 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05);
666#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 5
667
668#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 6
669 template <class Args_01,
670 class Args_02,
671 class Args_03,
672 class Args_04,
673 class Args_05,
674 class Args_06>
676 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
677 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
678 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
679 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
680 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06);
681#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 6
682
683#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 7
684 template <class Args_01,
685 class Args_02,
686 class Args_03,
687 class Args_04,
688 class Args_05,
689 class Args_06,
690 class Args_07>
692 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
693 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
694 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
695 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
696 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
697 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07);
698#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 7
699
700#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 8
701 template <class Args_01,
702 class Args_02,
703 class Args_03,
704 class Args_04,
705 class Args_05,
706 class Args_06,
707 class Args_07,
708 class Args_08>
710 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
711 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
712 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
713 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
714 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
715 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
716 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08);
717#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 8
718
719#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 9
720 template <class Args_01,
721 class Args_02,
722 class Args_03,
723 class Args_04,
724 class Args_05,
725 class Args_06,
726 class Args_07,
727 class Args_08,
728 class Args_09>
730 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
731 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
732 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
733 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
734 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
735 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
736 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
737 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09);
738#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 9
739
740#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 10
741 template <class Args_01,
742 class Args_02,
743 class Args_03,
744 class Args_04,
745 class Args_05,
746 class Args_06,
747 class Args_07,
748 class Args_08,
749 class Args_09,
750 class Args_10>
752 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
753 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
754 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
755 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
756 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
757 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
758 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
759 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
760 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10);
761#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 10
762
763
764#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 0
766#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 0
767
768#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 1
769 template <class Args_01>
771 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01);
772#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 1
773
774#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 2
775 template <class Args_01,
776 class Args_02>
778 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
779 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02);
780#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 2
781
782#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 3
783 template <class Args_01,
784 class Args_02,
785 class Args_03>
787 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
788 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
789 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03);
790#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 3
791
792#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 4
793 template <class Args_01,
794 class Args_02,
795 class Args_03,
796 class Args_04>
798 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
799 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
800 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
801 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04);
802#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 4
803
804#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 5
805 template <class Args_01,
806 class Args_02,
807 class Args_03,
808 class Args_04,
809 class Args_05>
811 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
812 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
813 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
814 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
815 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05);
816#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 5
817
818#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 6
819 template <class Args_01,
820 class Args_02,
821 class Args_03,
822 class Args_04,
823 class Args_05,
824 class Args_06>
826 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
827 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
828 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
829 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
830 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
831 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06);
832#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 6
833
834#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 7
835 template <class Args_01,
836 class Args_02,
837 class Args_03,
838 class Args_04,
839 class Args_05,
840 class Args_06,
841 class Args_07>
843 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
844 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
845 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
846 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
847 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
848 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
849 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07);
850#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 7
851
852#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 8
853 template <class Args_01,
854 class Args_02,
855 class Args_03,
856 class Args_04,
857 class Args_05,
858 class Args_06,
859 class Args_07,
860 class Args_08>
862 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
863 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
864 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
865 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
866 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
867 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
868 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
869 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08);
870#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 8
871
872#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 9
873 template <class Args_01,
874 class Args_02,
875 class Args_03,
876 class Args_04,
877 class Args_05,
878 class Args_06,
879 class Args_07,
880 class Args_08,
881 class Args_09>
883 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
884 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
885 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
886 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
887 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
888 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
889 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
890 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
891 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09);
892#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 9
893
894#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 10
895 template <class Args_01,
896 class Args_02,
897 class Args_03,
898 class Args_04,
899 class Args_05,
900 class Args_06,
901 class Args_07,
902 class Args_08,
903 class Args_09,
904 class Args_10>
906 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
907 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
908 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
909 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
910 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
911 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
912 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
913 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
914 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
915 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10);
916#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_A >= 10
917
918#else
919// The generated code below is a workaround for the absence of perfect
920// forwarding in some compilers.
921 template <class... Args>
923
924 template <class... Args>
927
928// }}} END GENERATED CODE
929#endif
930
931 /// Set the maximum load factor of this container to the specified
932 /// `newLoadFactor`.
933 void max_load_factor(float newLoadFactor);
934
935 /// Change the size of the array of buckets maintained by this container
936 /// to at least the specified `numBuckets`, and redistribute all the
937 /// contained elements into the new sequence of buckets, according to
938 /// their hash values. Note that this operation has no effect if
939 /// rehashing the elements into `numBuckets` would cause this unordered
940 /// multiset to exceed its `max_load_factor`.
941 void rehash(size_type numBuckets);
942
943 /// Increase the number of buckets of this unordered multiset to a
944 /// quantity such that the ratio between the specified `numElements` and
945 /// this quantity does not exceed `max_load_factor`. Note that this
946 /// guarantees that, after the reserve, elements can be inserted to grow
947 /// the container to `size() == numElements` without rehashing. Also
948 /// note that memory allocations may still occur when growing the
949 /// container to `size() == numElements`. Also note that this operation
950 /// has no effect if `numElements <= size()`.
951 void reserve(size_type numElements);
952
953 /// Exchange the value, hasher, key-equality functor, and
954 /// `max_load_factor` of this object with those of the specified `other`
955 /// object; also exchange the allocator of this object with that of
956 /// `other` if the (template parameter) type `ALLOCATOR` has the
957 /// `propagate_on_container_swap` trait, and do not modify either
958 /// allocator otherwise. This method provides the no-throw
959 /// exception-safety guarantee if and only if both the (template
960 /// parameter) types `HASH` and `EQUAL` provide no-throw swap
961 /// operations; if an exception is thrown, both objects are left in
962 /// valid but unspecified states. This operation guarantees `O[1]`
963 /// complexity. The behavior is undefined unless either this object was
964 /// created with the same allocator as `other` or `ALLOCATOR` has the
965 /// `propagate_on_container_swap` trait.
966 void swap(unordered_multiset& other)
968 AllocatorTraits::is_always_equal::value
969 && bsl::is_nothrow_swappable<HASH>::value
970 && bsl::is_nothrow_swappable<EQUAL>::value);
971
972 // ACCESSORS
973
974 /// Return (a copy of) the allocator used for memory allocation by this
975 /// unordered multiset.
976 ALLOCATOR get_allocator() const BSLS_KEYWORD_NOEXCEPT;
977
979
980 /// Return an iterator providing non-modifiable access to the first
981 /// `value_type` object in the sequence of `value_type` objects
982 /// maintained by this unordered multiset, or the `end` iterator if this
983 /// unordered multiset is empty.
985
987
988 /// Return an iterator providing non-modifiable access to the
989 /// past-the-end element in the sequence of `value_type` objects
990 /// maintained by this unordered multiset.
992
993 /// Return `true` if this unordered multiset contains an element whose
994 /// key is equivalent to the specified `key`.
995 bool contains(const key_type &key) const;
996
997 /// Return `true` if this unordered multiset contains an element whose
998 /// key is equivalent to the specified `key`.
999 template <class LOOKUP_KEY>
1000 typename enable_if<
1001 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value &&
1002 BloombergLP::bslmf::IsTransparentPredicate<EQUAL,
1003 LOOKUP_KEY>::value,
1004 bool>::type
1005 contains(const LOOKUP_KEY& key) const
1006 {
1007 // Note: implemented inline due to Sun CC compilation error
1008 return find(key) != end();
1009 }
1010
1011 /// Return `true` if this unordered multiset contains no elements, and
1012 /// `false` otherwise.
1013 bool empty() const BSLS_KEYWORD_NOEXCEPT;
1014
1015 /// Return the number of elements in this unordered multiset.
1017
1018 /// Return a theoretical upper bound on the largest number of elements
1019 /// that this unordered multiset could possibly hold. Note that there
1020 /// is no guarantee that the unordered multiset can successfully grow to
1021 /// the returned size, or even close to that size without running out of
1022 /// resources.
1024
1025 /// Return (a copy of) the key-equality binary functor that returns
1026 /// `true` if the value of two `key_type` objects are equivalent, and
1027 /// `false` otherwise.
1028 EQUAL key_eq() const;
1029
1030 /// Return (a copy of) the hash unary functor used by this unordered
1031 /// multiset to generate a hash value (of type `size_t`) for a
1032 /// `key_type` object.
1033 HASH hash_function() const;
1034
1035 /// Return an iterator providing non-modifiable access to the first
1036 /// `value_type` object in the sequence of all the value elements of
1037 /// this unordered multiset equivalent to the specified `key`, if such
1038 /// entries exist, and the past-the-end (`end`) iterator otherwise. The
1039 /// behavior is undefined unless `key` is equivalent to the elements of
1040 /// at most one equivalent-key group in this unordered multiset.
1041 template <class LOOKUP_KEY>
1042 typename enable_if<
1043 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1044 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
1045 const_iterator>::type
1046 find(const LOOKUP_KEY& key) const
1047 {
1048 // Note: implemented inline due to Sun CC compilation error.
1049 return const_iterator(d_impl.find(key));
1050 }
1051
1052 /// Return an iterator providing non-modifiable access to the first
1053 /// `value_type` object in the sequence of all the value elements of
1054 /// this unordered multiset equivalent to the specified `key`, if such
1055 /// entries exist, and the past-the-end (`end`) iterator otherwise.
1056 const_iterator find(const key_type& key) const;
1057
1058 /// Return the number of `value_type` objects within this unordered
1059 /// multiset that are equivalent to the specified `key`. The behavior
1060 /// is undefined unless `key` is equivalent to the elements of at most
1061 /// one equivalent-key group in this unordered multiset.
1062 template <class LOOKUP_KEY>
1063 typename enable_if<
1064 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1065 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
1066 size_type>::type
1067 count(const LOOKUP_KEY& key) const
1068 {
1069 // Note: implemented inline due to Sun CC compilation error.
1070 typedef ::BloombergLP::bslalg::BidirectionalNode<value_type> BNode;
1071
1072 size_type result = 0;
1073 for (HashTableLink *cursor = d_impl.find(key);
1074 cursor;
1075 ++result, cursor = cursor->nextLink()) {
1076
1077 BNode *cursorNode = static_cast<BNode *>(cursor);
1078 if (!this->key_eq()(
1079 key,
1080 ListConfiguration::extractKey(cursorNode->value()))) {
1081 break;
1082 }
1083 }
1084 return result;
1085 }
1086
1087 /// Return the number of `value_type` objects within this unordered
1088 /// multiset that are equivalent to the specified `key`.
1089 size_type count(const key_type& key) const;
1090
1091 /// Return a pair of iterators providing non-modifiable access to the
1092 /// sequence of `value_type` objects in this unordered multiset
1093 /// equivalent to the specified `key`, where the first iterator is
1094 /// positioned at the start of the sequence, and the second is
1095 /// positioned one past the end of the sequence. If this unordered
1096 /// multiset contains no `value_type` objects equivalent to the `key`,
1097 /// then the two returned iterators will have the same value. The
1098 /// behavior is undefined unless `key` is equivalent to the elements of
1099 /// at most one equivalent-key group in this unordered multiset.
1100 template <class LOOKUP_KEY>
1101 typename enable_if<
1102 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1103 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
1104 pair<const_iterator, const_iterator> >::type
1105 equal_range(const LOOKUP_KEY& key) const
1106 {
1107 // Note: implemented inline due to Sun CC compilation error.
1109 HashTableLink *first;
1110 HashTableLink *last;
1111 d_impl.findRange(&first, &last, key);
1112 return ResultType(const_iterator(first), const_iterator(last));
1113 }
1114
1115
1116 /// Return a pair of iterators providing non-modifiable access to the
1117 /// sequence of `value_type` objects in this unordered multiset
1118 /// equivalent to the specified `key`, where the first iterator is
1119 /// positioned at the start of the sequence, and the second is
1120 /// positioned one past the end of the sequence. If this unordered
1121 /// multiset contains no `value_type` objects equivalent to the `key`,
1122 /// then the two returned iterators will have the same value.
1123 pair<const_iterator, const_iterator> equal_range(
1124 const key_type& key) const;
1125
1127
1128 /// Return a local iterator providing non-modifiable access to the first
1129 /// `value_type` object (in the sequence of `value_type` objects) of the
1130 /// bucket having the specified `index` in the array of buckets
1131 /// maintained by this unordered multiset, or the `end(index)`
1132 /// otherwise. The behavior is undefined unless 'index <
1133 /// bucket_count()'.
1135
1136 const_local_iterator end(size_type index) const;
1137
1138 /// Return a local iterator providing non-modifiable access to the
1139 /// past-the-end element (in the sequence of `value_type` objects) of
1140 /// the bucket having the specified `index` in the array of buckets
1141 /// maintained by this unordered multiset. The behavior is undefined
1142 /// unless `index < bucket_count()`.
1143 const_local_iterator cend(size_type index) const;
1144
1145 /// Return the index of the bucket, in the array of buckets of this
1146 /// container, where a value equivalent to the specified `key` would be
1147 /// inserted.
1148 size_type bucket(const key_type& key) const;
1149
1150 /// Return the number of buckets in the array of buckets maintained by
1151 /// this unordered multiset.
1153
1154 /// Return a theoretical upper bound on the largest number of buckets
1155 /// that this container could possibly manage. Note that there is no
1156 /// guarantee that the unordered multiset can successfully grow to the
1157 /// returned size, or even close to that size without running out of
1158 /// resources.
1160
1161 /// Return the number of elements contained in the bucket at the
1162 /// specified `index` in the array of buckets maintained by this
1163 /// container. The behavior is undefined unless 'index <
1164 /// bucket_count()'.
1165 size_type bucket_size(size_type index) const;
1166
1167
1168 /// Return the current ratio between the `size` of this container and
1169 /// the number of buckets. The @ref load_factor is a measure of how full
1170 /// the container is, and a higher load factor leads to an increased
1171 /// number of collisions, thus resulting in a loss performance.
1172 float load_factor() const BSLS_KEYWORD_NOEXCEPT;
1173
1174 /// Return the maximum load factor allowed for this container. If an
1175 /// insert operation would cause @ref load_factor to exceed the
1176 /// `max_load_factor`, that same insert operation will increase the
1177 /// number of buckets and rehash the elements of the container into
1178 /// those buckets the (see rehash).
1180
1181};
1182
1183#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1184// CLASS TEMPLATE DEDUCTION GUIDES
1185
1186/// Deduce the template parameter `KEY` from the `value_type` of the
1187/// iterators supplied to the constructor of @ref unordered_multiset . Deduce
1188/// the template parameters `HASH`, `EQUAL` and `ALLOCATOR` from the other
1189/// parameters passed to the constructor. This deduction guide does not
1190/// participate unless: (1) the supplied `HASH` is invocable with a `KEY`,
1191/// (2) the supplied `EQUAL` is invocable with two `KEY`s, and (3) the
1192/// supplied allocator meets the requirements of a standard allocator.
1193template <
1194 class INPUT_ITERATOR,
1195 class KEY = BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1196 class HASH = bsl::hash<KEY>,
1197 class EQUAL = bsl::equal_to<KEY>,
1198 class ALLOCATOR = bsl::allocator<KEY>,
1199 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY&>>,
1200 class = bsl::enable_if_t<
1201 std::is_invocable_v<EQUAL, const KEY&, const KEY&>>,
1202 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
1203 >
1204unordered_multiset(INPUT_ITERATOR,
1205 INPUT_ITERATOR,
1206 typename bsl::allocator_traits<ALLOCATOR>::size_type = 0,
1207 HASH = HASH(),
1208 EQUAL = EQUAL(),
1209 ALLOCATOR = ALLOCATOR())
1210-> unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>;
1211
1212/// Deduce the template parameter `KEY` from the `value_type` of the
1213/// iterators supplied to the constructor of @ref unordered_multiset . Deduce
1214/// the template parameters `HASH` and `EQUAL` from the other parameters
1215/// passed to the constructor. This deduction guide does not participate
1216/// unless the supplied allocator is convertible to `bsl::allocator<KEY>`.
1217template <
1218 class INPUT_ITERATOR,
1219 class KEY = BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1220 class HASH,
1221 class EQUAL,
1222 class ALLOC,
1223 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1224 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1225 >
1227 INPUT_ITERATOR,
1228 INPUT_ITERATOR,
1229 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1230 HASH,
1231 EQUAL,
1232 ALLOC *)
1233-> unordered_multiset<KEY, HASH, EQUAL>;
1234
1235/// Deduce the template parameter `KEY` from the `value_type` of the
1236/// iterators supplied to the constructor of @ref unordered_multiset . Deduce
1237/// the template parameters `HASH` and `ALLOCATOR` from the other parameters
1238/// passed to the constructor. This deduction guide does not participate
1239/// unless the supplied `HASH` is invocable with a `KEY`, and the supplied
1240/// allocator meets the requirements of a standard allocator.
1241template <
1242 class INPUT_ITERATOR,
1243 class KEY = BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1244 class HASH,
1245 class ALLOCATOR,
1246 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
1247 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
1248 >
1249unordered_multiset(INPUT_ITERATOR,
1250 INPUT_ITERATOR,
1251 typename bsl::allocator_traits<ALLOCATOR>::size_type,
1252 HASH,
1253 ALLOCATOR)
1254-> unordered_multiset<KEY, HASH, bsl::equal_to<KEY>, ALLOCATOR>;
1255
1256/// Deduce the template parameter `KEY` from the `value_type` of the
1257/// iterators supplied to the constructor of @ref unordered_multiset . Deduce
1258/// the template parameter `HASH` from the other parameters passed to the
1259/// constructor. This deduction guide does not participate unless the
1260/// supplied allocator is convertible to `bsl::allocator<KEY>`.
1261template <
1262 class INPUT_ITERATOR,
1263 class KEY = BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1264 class HASH,
1265 class ALLOC,
1266 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1267 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1268 >
1270 INPUT_ITERATOR,
1271 INPUT_ITERATOR,
1272 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1273 HASH,
1274 ALLOC *)
1275-> unordered_multiset<KEY, HASH>;
1276
1277/// Deduce the template parameter `KEY` from the `value_type` of the
1278/// iterators supplied to the constructor of @ref unordered_multiset . This
1279/// deduction guide does not participate unless the supplied allocator meets
1280/// the requirements of a standard allocator.
1281template <
1282 class INPUT_ITERATOR,
1283 class ALLOCATOR,
1284 class KEY = BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1285 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1286 >
1287unordered_multiset(INPUT_ITERATOR,
1288 INPUT_ITERATOR,
1289 typename bsl::allocator_traits<ALLOCATOR>::size_type,
1290 ALLOCATOR)
1291-> unordered_multiset<KEY, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
1292
1293/// Deduce the template parameter `KEY` from the `value_type` of the
1294/// iterators supplied to the constructor of @ref unordered_multiset . This
1295/// deduction guide does not participate unless the supplied allocator is
1296/// convertible to `bsl::allocator<KEY>`.
1297template <
1298 class INPUT_ITERATOR,
1299 class KEY = BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1300 class ALLOC,
1301 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1302 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1303 >
1305 INPUT_ITERATOR,
1306 INPUT_ITERATOR,
1307 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1308 ALLOC *)
1309-> unordered_multiset<KEY>;
1310
1311/// Deduce the template parameter `KEY` from the `value_type` of the
1312/// iterators supplied to the constructor of @ref unordered_multiset . This
1313/// deduction guide does not participate unless the supplied allocator meets
1314/// the requirements of a standard allocator.
1315template <
1316 class INPUT_ITERATOR,
1317 class ALLOCATOR,
1318 class KEY = BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1319 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1320 >
1321unordered_multiset(INPUT_ITERATOR, INPUT_ITERATOR, ALLOCATOR)
1322-> unordered_multiset<KEY, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
1323
1324/// Deduce the template parameter `KEY` from the `value_type` of the
1325/// iterators supplied to the constructor of @ref unordered_multiset . This
1326/// deduction guide does not participate unless the supplied allocator is
1327/// convertible to `bsl::allocator<KEY>`.
1328template <
1329 class INPUT_ITERATOR,
1330 class KEY = BloombergLP::bslstl::IteratorUtil::IterVal_t<INPUT_ITERATOR>,
1331 class ALLOC,
1332 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1333 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1334 >
1335unordered_multiset(INPUT_ITERATOR, INPUT_ITERATOR, ALLOC *)
1336-> unordered_multiset<KEY>;
1337
1338/// Deduce the template parameter `KEY` from the `value_type` of the
1339/// initializer_list supplied to the constructor of @ref unordered_multiset .
1340/// Deduce the template parameters `HASH`, EQUAL and `ALLOCATOR` from the
1341/// other parameters passed to the constructor. This deduction guide does
1342/// not participate unless: (1) the supplied `HASH` is invocable with a
1343/// `KEY`, (2) the supplied `EQUAL` is invocable with two `KEY`s, and (3)
1344/// the supplied allocator meets the requirements of a standard allocator.
1345template <
1346 class KEY,
1347 class HASH = bsl::hash<KEY>,
1348 class EQUAL = bsl::equal_to<KEY>,
1349 class ALLOCATOR = bsl::allocator<KEY>,
1350 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY&>>,
1351 class = bsl::enable_if_t<
1352 std::is_invocable_v<EQUAL, const KEY&, const KEY&>>,
1353 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
1354 >
1355unordered_multiset(std::initializer_list<KEY>,
1356 typename bsl::allocator_traits<ALLOCATOR>::size_type = 0,
1357 HASH = HASH(),
1358 EQUAL = EQUAL(),
1359 ALLOCATOR = ALLOCATOR())
1360-> unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>;
1361
1362/// Deduce the template parameter `KEY` from the `value_type` of the
1363/// initializer_list supplied to the constructor of @ref unordered_multiset .
1364/// Deduce the template parameters `HASH` and `EQUAL` from the other
1365/// parameters passed to the constructor. This deduction guide does not
1366/// participate unless the supplied allocator is convertible to
1367/// `bsl::allocator<KEY>`.
1368template <
1369 class KEY,
1370 class HASH,
1371 class EQUAL,
1372 class ALLOC,
1373 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1374 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1375 >
1377 std::initializer_list<KEY>,
1378 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1379 HASH,
1380 EQUAL,
1381 ALLOC *)
1382-> unordered_multiset<KEY, HASH, EQUAL>;
1383
1384/// Deduce the template parameter `KEY` from the `value_type` of the
1385/// initializer_list supplied to the constructor of @ref unordered_multiset .
1386/// Deduce the template parameters `HASH` and `ALLOCATOR` from the other
1387/// parameters passed to the constructor. This deduction guide does not
1388/// participate unless the supplied `HASH` is invocable with a `KEY`, and
1389/// the supplied allocator meets the requirements of a standard allocator.
1390template <
1391 class KEY,
1392 class HASH,
1393 class ALLOCATOR,
1394 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
1395 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
1396 >
1397unordered_multiset(std::initializer_list<KEY>,
1398 typename bsl::allocator_traits<ALLOCATOR>::size_type,
1399 HASH,
1400 ALLOCATOR)
1401-> unordered_multiset<KEY, HASH, bsl::equal_to<KEY>, ALLOCATOR>;
1402
1403
1404/// Deduce the template parameter `KEY` from the `value_type` of the
1405/// initializer_list supplied to the constructor of @ref unordered_multiset .
1406/// Deduce the template parameter `HASH` from the other parameters passed to
1407/// the constructor. This deduction guide does not participate unless the
1408/// supplied allocator is convertible to `bsl::allocator<KEY>`.
1409template <
1410 class KEY,
1411 class HASH,
1412 class ALLOC,
1413 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1414 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1415 >
1417 std::initializer_list<KEY>,
1418 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1419 HASH,
1420 ALLOC *)
1421-> unordered_multiset<KEY, HASH>;
1422
1423/// Deduce the template parameter `KEY` from the `value_type` of the
1424/// initializer_list supplied to the constructor of @ref unordered_multiset .
1425/// This deduction guide does not participate unless the supplied allocator
1426/// meets the requirements of a standard allocator.
1427template <
1428 class KEY,
1429 class ALLOCATOR,
1430 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1431 >
1432unordered_multiset(std::initializer_list<KEY>,
1433 typename bsl::allocator_traits<ALLOCATOR>::size_type,
1434 ALLOCATOR)
1435-> unordered_multiset<KEY, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
1436
1437/// Deduce the template parameter `KEY` from the `value_type` of the
1438/// initializer_list supplied to the constructor of @ref unordered_multiset .
1439/// This deduction guide does not participate unless the supplied allocator
1440/// is convertible to `bsl::allocator<KEY>`.
1441template <
1442 class KEY,
1443 class ALLOC,
1444 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1445 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1446 >
1448 std::initializer_list<KEY>,
1449 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
1450 ALLOC *)
1451-> unordered_multiset<KEY>;
1452
1453/// Deduce the template parameter `KEY` from the `value_type` of the
1454/// initializer_list supplied to the constructor of @ref unordered_multiset .
1455/// This deduction guide does not participate unless the supplied allocator
1456/// meets the requirements of a standard allocator.
1457template <
1458 class KEY,
1459 class ALLOCATOR,
1460 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
1461 >
1462unordered_multiset(std::initializer_list<KEY>, ALLOCATOR)
1463-> unordered_multiset<KEY, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
1464
1465/// Deduce the template parameter `KEY` from the `value_type` of the
1466/// initializer_list supplied to the constructor of @ref unordered_multiset .
1467/// This deduction guide does not participate unless the supplied allocator
1468/// is convertible to `bsl::allocator<KEY>`.
1469template <
1470 class KEY,
1471 class ALLOC,
1472 class DEFAULT_ALLOCATOR = bsl::allocator<KEY>,
1473 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
1474 >
1475unordered_multiset(std::initializer_list<KEY>, ALLOC *)
1476-> unordered_multiset<KEY>;
1477#endif
1478
1479// FREE OPERATORS
1480
1481/// Return `true` if the specified `lhs` and `rhs` objects have the same
1482/// value, and `false` otherwise. Two @ref unordered_multiset objects have the
1483/// same value if they have the same number of value elements, and for each
1484/// value-element that is contained in `lhs` there is a value-element
1485/// contained in `rhs` having the same value, and vice-versa. Note that
1486/// this method requires that the (template parameter) type `KEY` be
1487/// `equality-comparable` (see {Requirements on `KEY`}).
1488template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1489bool operator==(const unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>& lhs,
1490 const unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>& rhs);
1491
1492#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
1493template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1494bool operator!=(const unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>& lhs,
1495 const unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>& rhs);
1496 // Return 'true' if the specified 'lhs' and 'rhs' objects do not have the
1497 // same value, and 'false' otherwise. Two @ref unordered_multiset objects do
1498 // not have the same value if they do not have the same number of
1499 // value elements, or that for some value-element contained in 'lhs' there
1500 // is not a value-element in 'rhs' having the same value, and vice-versa.
1501 // Note that this method requires that the (template parameter) type 'KEY'
1502 // and be 'equality-comparable' (see {Requirements on 'KEY'}).
1503#endif
1504
1505// FREE FUNCTIONS
1506
1507/// Erase all the elements in the specified unordered_multiset `ms` that
1508/// satisfy the specified predicate `predicate`. Return the number of
1509/// elements erased.
1510template <class KEY, class HASH, class EQUAL, class ALLOCATOR, class PREDICATE>
1511typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size_type
1512erase_if(unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>& ms,
1513 PREDICATE predicate);
1514
1515template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1516void swap(unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>& a,
1517 unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>& b)
1519 BSLS_KEYWORD_NOEXCEPT_OPERATOR(a.swap(b)));
1520 // Exchange the value, hasher, key-equality functor, and 'max_load_factor'
1521 // of the specified 'a' object with those of the specified 'b' object; also
1522 // exchange the allocator of 'a' with that of 'b' if the (template
1523 // parameter) type 'ALLOCATOR' has the 'propagate_on_container_swap' trait,
1524 // and do not modify either allocator otherwise. This function provides
1525 // the no-throw exception-safety guarantee if and only if both the
1526 // (template parameter) types 'HASH' and 'EQUAL' provide no-throw swap
1527 // operations; if an exception is thrown, both objects are left in valid
1528 // but unspecified states. This operation guarantees 'O[1]' complexity.
1529 // The behavior is undefined unless either 'a' was created with the same
1530 // allocator as 'b' or 'ALLOCATOR' has the 'propagate_on_container_swap'
1531 // trait.
1532
1533// ============================================================================
1534// TEMPLATE AND INLINE FUNCTION DEFINITIONS
1535// ============================================================================
1536
1537 //-------------------------
1538 // class unordered_multiset
1539 //-------------------------
1540
1541// CREATORS
1542template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1543inline
1544unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset()
1545: d_impl(HASH(), EQUAL(), 0, 1.0f, ALLOCATOR())
1546{
1547}
1548
1549template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1550inline
1552 size_type initialNumBuckets,
1553 const HASH& hashFunction,
1554 const EQUAL& keyEqual,
1555 const ALLOCATOR& basicAllocator)
1556: d_impl(hashFunction, keyEqual, initialNumBuckets, 1.0f, basicAllocator)
1557{
1558}
1559
1560template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1561inline
1562unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1563 size_type initialNumBuckets,
1564 const HASH& hashFunction,
1565 const ALLOCATOR& basicAllocator)
1566: d_impl(hashFunction, EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
1567{
1568}
1569
1570template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1571inline
1572unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1573 size_type initialNumBuckets,
1574 const ALLOCATOR& basicAllocator)
1575: d_impl(HASH(), EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
1576{
1577}
1578
1579template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1580inline
1581unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1582 const ALLOCATOR& basicAllocator)
1583: d_impl(basicAllocator)
1584{
1585}
1586
1587template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1588inline
1589unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1590 const unordered_multiset& original)
1591: d_impl(original.d_impl,
1592 AllocatorTraits::select_on_container_copy_construction(
1593 original.get_allocator()))
1594{
1595}
1596
1597template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1598inline
1599unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1600 BloombergLP::bslmf::MovableRef<unordered_multiset> original)
1601: d_impl(MoveUtil::move(MoveUtil::access(original).d_impl))
1602{
1603}
1604
1605template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1606inline
1607unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1608 const unordered_multiset& original,
1609 const typename type_identity<ALLOCATOR>::type& basicAllocator)
1610: d_impl(original.d_impl, basicAllocator)
1611{
1612}
1613
1614template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1615inline
1616unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1617 BloombergLP::bslmf::MovableRef<unordered_multiset> original,
1618 const typename type_identity<ALLOCATOR>::type& basicAllocator)
1619: d_impl(MoveUtil::move(MoveUtil::access(original).d_impl), basicAllocator)
1620{
1621}
1622
1623template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1624template <class INPUT_ITERATOR>
1625inline
1626unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1627 INPUT_ITERATOR first,
1628 INPUT_ITERATOR last,
1629 size_type initialNumBuckets,
1630 const HASH& hashFunction,
1631 const EQUAL& keyEqual,
1632 const ALLOCATOR& basicAllocator)
1633: d_impl(hashFunction, keyEqual, initialNumBuckets, 1.0f, basicAllocator)
1634{
1635 this->insert(first, last);
1636}
1637
1638template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1639template <class INPUT_ITERATOR>
1640inline
1641unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1642 INPUT_ITERATOR first,
1643 INPUT_ITERATOR last,
1644 size_type initialNumBuckets,
1645 const HASH& hashFunction,
1646 const ALLOCATOR& basicAllocator)
1647: d_impl(hashFunction, EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
1648{
1649 this->insert(first, last);
1650}
1651
1652template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1653template <class INPUT_ITERATOR>
1654inline
1655unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1656 INPUT_ITERATOR first,
1657 INPUT_ITERATOR last,
1658 size_type initialNumBuckets,
1659 const ALLOCATOR& basicAllocator)
1660: d_impl(HASH(), EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
1661{
1662 this->insert(first, last);
1663}
1664
1665template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1666template <class INPUT_ITERATOR>
1667inline
1668unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1669 INPUT_ITERATOR first,
1670 INPUT_ITERATOR last,
1671 const ALLOCATOR& basicAllocator)
1672: d_impl(HASH(), EQUAL(), 0, 1.0f, basicAllocator)
1673{
1674 this->insert(first, last);
1675}
1676
1677#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1678template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1679#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1680template <class, class, class>
1681#endif
1682inline
1683unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1684 std::initializer_list<KEY> values,
1685 size_type initialNumBuckets,
1686 const hasher& hashFunction,
1687 const key_equal& keyEqual,
1688 const ALLOCATOR& basicAllocator)
1689: unordered_multiset(values.begin(),
1690 values.end(),
1691 initialNumBuckets,
1692 hashFunction,
1693 keyEqual,
1694 basicAllocator)
1695{
1696}
1697
1698template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1699#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1700template <class, class>
1701#endif
1702inline
1703unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1704 std::initializer_list<KEY> values,
1705 size_type initialNumBuckets,
1706 const HASH& hashFunction,
1707 const ALLOCATOR& basicAllocator)
1708: unordered_multiset(values.begin(),
1709 values.end(),
1710 initialNumBuckets,
1711 hashFunction,
1712 EQUAL(),
1713 basicAllocator)
1714{
1715}
1716
1717template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1718#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1719template <class>
1720#endif
1721inline
1722unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1723 std::initializer_list<KEY> values,
1724 size_type initialNumBuckets,
1725 const ALLOCATOR& basicAllocator)
1726: unordered_multiset(values.begin(),
1727 values.end(),
1728 initialNumBuckets,
1729 HASH(),
1730 EQUAL(),
1731 basicAllocator)
1732{
1733}
1734
1735template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1736#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1737template <class>
1738#endif
1739inline
1740unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::unordered_multiset(
1741 std::initializer_list<KEY> values,
1742 const ALLOCATOR& basicAllocator)
1743: unordered_multiset(values.begin(),
1744 values.end(),
1745 0,
1746 HASH(),
1747 EQUAL(),
1748 basicAllocator)
1749{
1750}
1751#endif // defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1752
1753template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1754inline
1755unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::~unordered_multiset()
1756{
1757 // All memory management is handled by the base 'd_impl' member.
1758}
1759
1760// MANIPULATORS
1761template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1762inline
1763unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>&
1764unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::operator=(
1765 const unordered_multiset& rhs)
1766{
1767 // Note that we have delegated responsibility for correct handling of
1768 // allocator propagation to the 'HashTable' implementation.
1769
1770 d_impl = rhs.d_impl;
1771
1772 return *this;
1773}
1774
1775template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1776inline
1777unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>&
1778unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::operator=(
1779 BloombergLP::bslmf::MovableRef<unordered_multiset> rhs)
1781 AllocatorTraits::is_always_equal::value
1782 && std::is_nothrow_move_assignable<HASH>::value
1783 && std::is_nothrow_move_assignable<EQUAL>::value)
1784{
1785 // Note that we have delegated responsibility for correct handling of
1786 // allocator propagation to the 'HashTable' implementation.
1787
1788 unordered_multiset& lvalue = rhs;
1789
1790 d_impl = MoveUtil::move(lvalue.d_impl);
1791
1792 return *this;
1793}
1794
1795#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1796template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1797inline
1798unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>&
1799unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::operator=(
1800 std::initializer_list<KEY> values)
1801{
1802 unordered_multiset tmp(values, d_impl.allocator());
1803
1804 d_impl.swap(tmp.d_impl);
1805
1806 return *this;
1807}
1808#endif
1809
1810#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1811// {{{ BEGIN GENERATED CODE
1812// Command line: sim_cpp11_features.pl bslstl_unorderedmultiset.h
1813#ifndef BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT
1814#define BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT 10
1815#endif
1816#ifndef BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B
1817#define BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT
1818#endif
1819#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 0
1820template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1821inline
1822typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
1823unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
1824 )
1825{
1826 return iterator(d_impl.emplace(
1827 ));
1828
1829}
1830#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 0
1831
1832#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 1
1833template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1834template <class Args_01>
1835inline
1836typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
1837unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
1838 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01)
1839{
1840 return iterator(d_impl.emplace(
1841 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01)));
1842
1843}
1844#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 1
1845
1846#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 2
1847template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1848template <class Args_01,
1849 class Args_02>
1850inline
1851typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
1852unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
1853 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1854 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02)
1855{
1856 return iterator(d_impl.emplace(
1857 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
1858 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02)));
1859
1860}
1861#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 2
1862
1863#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 3
1864template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1865template <class Args_01,
1866 class Args_02,
1867 class Args_03>
1868inline
1869typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
1870unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
1871 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1872 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1873 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03)
1874{
1875 return iterator(d_impl.emplace(
1876 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
1877 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
1878 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03)));
1879
1880}
1881#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 3
1882
1883#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 4
1884template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1885template <class Args_01,
1886 class Args_02,
1887 class Args_03,
1888 class Args_04>
1889inline
1890typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
1891unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
1892 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1893 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1894 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1895 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04)
1896{
1897 return iterator(d_impl.emplace(
1898 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
1899 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
1900 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
1901 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04)));
1902
1903}
1904#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 4
1905
1906#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 5
1907template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1908template <class Args_01,
1909 class Args_02,
1910 class Args_03,
1911 class Args_04,
1912 class Args_05>
1913inline
1914typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
1915unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
1916 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1917 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1918 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1919 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1920 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05)
1921{
1922 return iterator(d_impl.emplace(
1923 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
1924 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
1925 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
1926 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
1927 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05)));
1928
1929}
1930#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 5
1931
1932#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 6
1933template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1934template <class Args_01,
1935 class Args_02,
1936 class Args_03,
1937 class Args_04,
1938 class Args_05,
1939 class Args_06>
1940inline
1941typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
1942unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
1943 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1944 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1945 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1946 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1947 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1948 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06)
1949{
1950 return iterator(d_impl.emplace(
1951 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
1952 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
1953 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
1954 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
1955 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
1956 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06)));
1957
1958}
1959#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 6
1960
1961#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 7
1962template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1963template <class Args_01,
1964 class Args_02,
1965 class Args_03,
1966 class Args_04,
1967 class Args_05,
1968 class Args_06,
1969 class Args_07>
1970inline
1971typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
1972unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
1973 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1974 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1975 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1976 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1977 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1978 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1979 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07)
1980{
1981 return iterator(d_impl.emplace(
1982 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
1983 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
1984 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
1985 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
1986 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
1987 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
1988 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07)));
1989
1990}
1991#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 7
1992
1993#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 8
1994template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
1995template <class Args_01,
1996 class Args_02,
1997 class Args_03,
1998 class Args_04,
1999 class Args_05,
2000 class Args_06,
2001 class Args_07,
2002 class Args_08>
2003inline
2004typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2005unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
2006 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2007 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2008 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2009 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2010 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2011 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2012 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
2013 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08)
2014{
2015 return iterator(d_impl.emplace(
2016 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2017 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2018 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
2019 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
2020 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
2021 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
2022 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
2023 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08)));
2024
2025}
2026#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 8
2027
2028#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 9
2029template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2030template <class Args_01,
2031 class Args_02,
2032 class Args_03,
2033 class Args_04,
2034 class Args_05,
2035 class Args_06,
2036 class Args_07,
2037 class Args_08,
2038 class Args_09>
2039inline
2040typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2041unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
2042 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2043 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2044 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2045 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2046 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2047 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2048 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
2049 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
2050 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09)
2051{
2052 return iterator(d_impl.emplace(
2053 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2054 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2055 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
2056 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
2057 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
2058 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
2059 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
2060 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
2061 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09)));
2062
2063}
2064#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 9
2065
2066#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 10
2067template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2068template <class Args_01,
2069 class Args_02,
2070 class Args_03,
2071 class Args_04,
2072 class Args_05,
2073 class Args_06,
2074 class Args_07,
2075 class Args_08,
2076 class Args_09,
2077 class Args_10>
2078inline
2079typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2080unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
2081 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2082 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2083 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2084 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2085 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2086 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2087 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
2088 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
2089 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
2090 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10)
2091{
2092 return iterator(d_impl.emplace(
2093 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2094 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2095 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
2096 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
2097 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
2098 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
2099 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
2100 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
2101 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09),
2102 BSLS_COMPILERFEATURES_FORWARD(Args_10, arguments_10)));
2103
2104}
2105#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 10
2106
2107
2108#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 0
2109template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2110inline
2111typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2112unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2113 const_iterator hint)
2114{
2115 return iterator(d_impl.emplaceWithHint(hint.node()));
2116}
2117#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 0
2118
2119#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 1
2120template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2121template <class Args_01>
2122inline
2123typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2124unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2125 const_iterator hint,
2126 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01)
2127{
2128 return iterator(d_impl.emplaceWithHint(hint.node(),
2129 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01)));
2130}
2131#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 1
2132
2133#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 2
2134template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2135template <class Args_01,
2136 class Args_02>
2137inline
2138typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2139unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2140 const_iterator hint,
2141 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2142 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02)
2143{
2144 return iterator(d_impl.emplaceWithHint(hint.node(),
2145 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2146 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02)));
2147}
2148#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 2
2149
2150#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 3
2151template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2152template <class Args_01,
2153 class Args_02,
2154 class Args_03>
2155inline
2156typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2157unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2158 const_iterator hint,
2159 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2160 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2161 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03)
2162{
2163 return iterator(d_impl.emplaceWithHint(hint.node(),
2164 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2165 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2166 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03)));
2167}
2168#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 3
2169
2170#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 4
2171template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2172template <class Args_01,
2173 class Args_02,
2174 class Args_03,
2175 class Args_04>
2176inline
2177typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2178unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2179 const_iterator hint,
2180 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2181 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2182 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2183 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04)
2184{
2185 return iterator(d_impl.emplaceWithHint(hint.node(),
2186 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2187 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2188 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
2189 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04)));
2190}
2191#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 4
2192
2193#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 5
2194template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2195template <class Args_01,
2196 class Args_02,
2197 class Args_03,
2198 class Args_04,
2199 class Args_05>
2200inline
2201typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2202unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2203 const_iterator hint,
2204 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2205 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2206 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2207 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2208 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05)
2209{
2210 return iterator(d_impl.emplaceWithHint(hint.node(),
2211 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2212 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2213 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
2214 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
2215 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05)));
2216}
2217#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 5
2218
2219#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 6
2220template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2221template <class Args_01,
2222 class Args_02,
2223 class Args_03,
2224 class Args_04,
2225 class Args_05,
2226 class Args_06>
2227inline
2228typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2229unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2230 const_iterator hint,
2231 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2232 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2233 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2234 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2235 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2236 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06)
2237{
2238 return iterator(d_impl.emplaceWithHint(hint.node(),
2239 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2240 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2241 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
2242 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
2243 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
2244 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06)));
2245}
2246#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 6
2247
2248#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 7
2249template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2250template <class Args_01,
2251 class Args_02,
2252 class Args_03,
2253 class Args_04,
2254 class Args_05,
2255 class Args_06,
2256 class Args_07>
2257inline
2258typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2259unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2260 const_iterator hint,
2261 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2262 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2263 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2264 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2265 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2266 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2267 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07)
2268{
2269 return iterator(d_impl.emplaceWithHint(hint.node(),
2270 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2271 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2272 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
2273 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
2274 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
2275 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
2276 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07)));
2277}
2278#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 7
2279
2280#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 8
2281template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2282template <class Args_01,
2283 class Args_02,
2284 class Args_03,
2285 class Args_04,
2286 class Args_05,
2287 class Args_06,
2288 class Args_07,
2289 class Args_08>
2290inline
2291typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2292unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2293 const_iterator hint,
2294 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2295 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2296 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2297 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2298 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2299 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2300 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
2301 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08)
2302{
2303 return iterator(d_impl.emplaceWithHint(hint.node(),
2304 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2305 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2306 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
2307 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
2308 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
2309 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
2310 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
2311 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08)));
2312}
2313#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 8
2314
2315#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 9
2316template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2317template <class Args_01,
2318 class Args_02,
2319 class Args_03,
2320 class Args_04,
2321 class Args_05,
2322 class Args_06,
2323 class Args_07,
2324 class Args_08,
2325 class Args_09>
2326inline
2327typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2328unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2329 const_iterator hint,
2330 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2331 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2332 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2333 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2334 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2335 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2336 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
2337 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
2338 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09)
2339{
2340 return iterator(d_impl.emplaceWithHint(hint.node(),
2341 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2342 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2343 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
2344 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
2345 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
2346 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
2347 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
2348 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
2349 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09)));
2350}
2351#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 9
2352
2353#if BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 10
2354template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2355template <class Args_01,
2356 class Args_02,
2357 class Args_03,
2358 class Args_04,
2359 class Args_05,
2360 class Args_06,
2361 class Args_07,
2362 class Args_08,
2363 class Args_09,
2364 class Args_10>
2365inline
2366typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2367unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2368 const_iterator hint,
2369 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2370 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2371 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2372 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2373 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2374 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2375 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
2376 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
2377 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
2378 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10)
2379{
2380 return iterator(d_impl.emplaceWithHint(hint.node(),
2381 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
2382 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
2383 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
2384 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
2385 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
2386 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
2387 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
2388 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
2389 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09),
2390 BSLS_COMPILERFEATURES_FORWARD(Args_10, arguments_10)));
2391}
2392#endif // BSLSTL_UNORDEREDMULTISET_VARIADIC_LIMIT_B >= 10
2393
2394#else
2395// The generated code below is a workaround for the absence of perfect
2396// forwarding in some compilers.
2397template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2398template <class... Args>
2399inline
2400typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2401unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace(
2402 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments)
2403{
2404 return iterator(d_impl.emplace(
2405 BSLS_COMPILERFEATURES_FORWARD(Args, arguments)...));
2406
2407}
2408
2409template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2410template <class... Args>
2411inline
2412typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2413unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::emplace_hint(
2414 const_iterator hint,
2415 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments)
2416{
2417 return iterator(d_impl.emplaceWithHint(hint.node(),
2418 BSLS_COMPILERFEATURES_FORWARD(Args, arguments)...));
2419}
2420// }}} END GENERATED CODE
2421#endif
2422
2423template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2424inline
2425typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2426unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::begin() BSLS_KEYWORD_NOEXCEPT
2427{
2428 return iterator(d_impl.elementListRoot());
2429}
2430
2431template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2432inline
2433typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2434unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::end() BSLS_KEYWORD_NOEXCEPT
2435{
2436 return iterator();
2437}
2438
2439template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2440inline
2441typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::local_iterator
2442unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::begin(size_type index)
2443{
2444 BSLS_ASSERT_SAFE(index < this->bucket_count());
2445
2446 return local_iterator(&d_impl.bucketAtIndex(index));
2447}
2448
2449template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2450inline
2451typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::local_iterator
2452unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::end(size_type index)
2453{
2454 BSLS_ASSERT_SAFE(index < this->bucket_count());
2455
2456 return local_iterator(0, &d_impl.bucketAtIndex(index));
2457}
2458
2459template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2460inline
2461void
2462unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::clear() BSLS_KEYWORD_NOEXCEPT
2463{
2464 d_impl.removeAll();
2465}
2466
2467template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2468typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2469unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::find(const key_type& key)
2470{
2471 return iterator(d_impl.find(key));
2472}
2473
2474template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2475inline
2477 typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator>
2478unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::equal_range(
2479 const key_type& key)
2480{
2481 HashTableLink *first;
2482 HashTableLink *last;
2483 d_impl.findRange(&first, &last, key);
2484 return bsl::pair<iterator, iterator>(iterator(first), iterator(last));
2485}
2486
2487template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2488inline
2489typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2490unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::erase(const_iterator position)
2491{
2492 BSLS_ASSERT(position != this->end());
2493
2494 return iterator(d_impl.remove(position.node()));
2495}
2496
2497template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2498typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size_type
2499unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::erase(const key_type& key)
2500{
2501 typedef ::BloombergLP::bslalg::BidirectionalNode<value_type> BNode;
2502
2503 HashTableLink *target = d_impl.find(key);
2504 if (target) {
2505 target = d_impl.remove(target);
2506 size_type result = 1;
2507 while (target &&
2508 this->key_eq()(key, ListConfiguration::extractKey(
2509 static_cast<BNode *>(target)->value()))) {
2510 target = d_impl.remove(target);
2511 ++result;
2512 }
2513 return result; // RETURN
2514 }
2515
2516 return 0;
2517}
2518
2519template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2520typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2521unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::erase(const_iterator first,
2522 const_iterator last)
2523{
2524
2525#if defined BDE_BUILD_TARGET_SAFE_2
2526 if (first != last) {
2527 iterator it = this->begin();
2528 const iterator end = this->end();
2529 for (; it != first; ++it) {
2530 BSLS_ASSERT(last != it);
2531 BSLS_ASSERT(end != it);
2532 }
2533 for (; it != last; ++it) {
2534 BSLS_ASSERT(end != it);
2535 }
2536 }
2537#endif
2538
2539 while (first != last) {
2540 first = this->erase(first);
2541 }
2542
2543 return iterator(first.node()); // convert from const_iterator
2544}
2545
2546template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2547inline
2548typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2549unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::insert(
2550 const value_type& value)
2551{
2552 return iterator(d_impl.insert(value));
2553}
2554
2555template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2556inline
2557typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2558unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::insert(
2559 BloombergLP::bslmf::MovableRef<value_type> value)
2560{
2561 return iterator(d_impl.insert(MoveUtil::move(value)));
2562}
2563
2564template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2565inline
2566typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2567unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::insert(
2568 const_iterator hint,
2569 const value_type& value)
2570{
2571 return iterator(d_impl.insert(value, hint.node()));
2572}
2573
2574template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2575inline
2576typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::iterator
2577unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::insert(
2578 const_iterator hint,
2579 BloombergLP::bslmf::MovableRef<value_type> value)
2580{
2581 return iterator(d_impl.insert(MoveUtil::move(value), hint.node()));
2582}
2583
2584template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2585template <class INPUT_ITERATOR>
2586void
2587unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::insert(INPUT_ITERATOR first,
2588 INPUT_ITERATOR last)
2589{
2590 difference_type maxInsertions =
2591 ::BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
2592 if (maxInsertions) {
2593 this->reserve(this->size() + maxInsertions);
2594 }
2595
2596 while (first != last) {
2597 d_impl.insert(*first);
2598 ++first;
2599 }
2600}
2601
2602#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2603template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2604inline
2605void unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::insert(
2606 std::initializer_list<KEY> values)
2607{
2608 insert(values.begin(), values.end());
2609}
2610#endif
2611
2612template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2613inline
2614void unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::max_load_factor(
2615 float newLoadFactor)
2616{
2617 d_impl.setMaxLoadFactor(newLoadFactor);
2618}
2619
2620template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2621inline
2622void
2623unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::rehash(size_type numBuckets)
2624{
2625 d_impl.rehashForNumBuckets(numBuckets);
2626}
2627
2628template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2629inline
2630void
2631unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::reserve(size_type numElements)
2632{
2633 d_impl.reserveForNumElements(numElements);
2634}
2635
2636template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2637inline
2638void
2639unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::swap(
2640 unordered_multiset& other)
2642 AllocatorTraits::is_always_equal::value
2643 && bsl::is_nothrow_swappable<HASH>::value
2644 && bsl::is_nothrow_swappable<EQUAL>::value)
2645{
2646 d_impl.swap(other.d_impl);
2647}
2648
2649// ACCESSORS
2650template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2651inline
2652ALLOCATOR
2653unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::get_allocator() const
2655{
2656 return d_impl.allocator();
2657}
2658
2659template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2660inline
2661typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_iterator
2662unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::begin() const
2664{
2665 return const_iterator(d_impl.elementListRoot());
2666}
2667
2668template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2669inline
2670typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_iterator
2671unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::end() const
2673{
2674 return const_iterator();
2675}
2676
2677template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2678inline
2679typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_iterator
2680unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::cbegin() const
2682{
2683 return const_iterator(d_impl.elementListRoot());
2684}
2685
2686template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2687inline
2688typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_iterator
2689unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::cend() const
2691{
2692 return const_iterator();
2693}
2694
2695template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2696inline
2697typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_local_iterator
2698unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::begin(size_type index) const
2699{
2700 BSLS_ASSERT_SAFE(index < this->bucket_count());
2701
2702 return const_local_iterator(&d_impl.bucketAtIndex(index));
2703}
2704
2705template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2706inline
2707typename
2708 unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_local_iterator
2709unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::end(size_type index) const
2710{
2711 BSLS_ASSERT_SAFE(index < this->bucket_count());
2712
2713 return const_local_iterator(0, &d_impl.bucketAtIndex(index));
2714}
2715
2716
2717template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2718inline
2719typename
2720 unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_local_iterator
2721unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::cbegin(size_type index) const
2722{
2723 BSLS_ASSERT_SAFE(index < this->bucket_count());
2724
2725 return const_local_iterator(&d_impl.bucketAtIndex(index));
2726}
2727
2728template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2729inline
2730typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_local_iterator
2731unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::cend(size_type index) const
2732{
2733 BSLS_ASSERT_SAFE(index < this->bucket_count());
2734
2735 return const_local_iterator(0, &d_impl.bucketAtIndex(index));
2736}
2737
2738template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2739inline
2740typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size_type
2741unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::bucket(
2742 const key_type& key) const
2743{
2744 return d_impl.bucketIndexForKey(key);
2745}
2746
2747template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2748inline
2749typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size_type
2750unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::bucket_count() const
2752{
2753 return d_impl.numBuckets();
2754}
2755
2756template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2757inline
2758typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size_type
2759unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::bucket_size(
2760 size_type index) const
2761{
2762 BSLS_ASSERT_SAFE(index < this->bucket_count());
2763
2764 return d_impl.countElementsInBucket(index);
2765}
2766
2767template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2768typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size_type
2769unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::count(
2770 const key_type& key) const
2771{
2772 typedef ::BloombergLP::bslalg::BidirectionalNode<value_type> BNode;
2773
2774 size_type result = 0;
2775 for (HashTableLink *cursor = d_impl.find(key);
2776 cursor;
2777 ++result, cursor = cursor->nextLink()) {
2778
2779 BNode *cursorNode = static_cast<BNode *>(cursor);
2780 if (!this->key_eq()(
2781 key,
2782 ListConfiguration::extractKey(cursorNode->value()))) {
2783 break;
2784 }
2785 }
2786 return result;
2787}
2788
2789template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2790inline
2791typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_iterator
2792unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::find(
2793 const key_type& key) const
2794{
2795 return const_iterator(d_impl.find(key));
2796}
2797
2798template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2799inline
2800bool unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::contains(
2801 const key_type& key) const
2802{
2803 return find(key) != end();
2804}
2805
2806
2807template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2808inline
2809bool
2810unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::empty() const
2812{
2813 return 0 == d_impl.size();
2814}
2815
2816template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2817inline
2818typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size_type
2819unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size() const
2821{
2822 return d_impl.size();
2823}
2824
2825template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2826inline
2827typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size_type
2828unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::max_size() const
2830{
2831 return AllocatorTraits::max_size(get_allocator());
2832}
2833
2834template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2835inline
2836typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::hasher
2837unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::hash_function() const
2838{
2839 return d_impl.hasher();
2840}
2841
2842template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2843inline
2844typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::key_equal
2845unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::key_eq() const
2846{
2847 return d_impl.comparator();
2848}
2849
2850template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2851inline
2852bsl::pair<
2853 typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_iterator,
2854 typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::const_iterator>
2855unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::equal_range(
2856 const key_type& key) const
2857{
2858 HashTableLink *first;
2859 HashTableLink *last;
2860 d_impl.findRange(&first, &last, key);
2861 return bsl::pair<const_iterator, const_iterator>(const_iterator(first),
2862 const_iterator(last));
2863}
2864
2865template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2866inline
2867typename unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size_type
2868unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::max_bucket_count() const
2870{
2871 return d_impl.maxNumBuckets();
2872}
2873
2874
2875template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2876inline
2877float unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::load_factor() const
2879{
2880 return d_impl.loadFactor();
2881}
2882
2883template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2884inline
2885float unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::max_load_factor() const
2887{
2888 return d_impl.maxLoadFactor();
2889}
2890
2891} // close namespace bsl
2892
2893// FREE OPERATORS
2894template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2895inline
2896bool bsl::operator==(
2899{
2900 return lhs.d_impl == rhs.d_impl;
2901}
2902
2903#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
2904template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2905inline
2906bool bsl::operator!=(
2909{
2910 return !(lhs == rhs);
2911}
2912#endif
2913
2914// FREE FUNCTIONS
2915template <class KEY, class HASH, class EQUAL, class ALLOCATOR, class PREDICATE>
2916inline
2918bsl::erase_if(unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>& ms,
2919 PREDICATE predicate)
2920{
2921 return BloombergLP::bslstl::AlgorithmUtil::containerEraseIf(ms, predicate);
2922}
2923
2924template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2925inline
2926void
2931{
2932 a.swap(b);
2933}
2934
2935// ============================================================================
2936// TYPE TRAITS
2937// ============================================================================
2938
2939// Type traits for STL *unordered* *associative* containers:
2940//: o An unordered associative container defines STL iterators.
2941//: o An unordered associative container is bitwise movable if both functors
2942//: and the allocator are bitwise movable.
2943//: o An unordered associative container uses 'bslma' allocators if the
2944//: (template parameter) type 'ALLOCATOR' is convertible from
2945//: 'bslma::Allocator *'.
2946
2947
2948
2949namespace bslalg {
2950
2951template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2952struct HasStlIterators<bsl::unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR> >
2954{};
2955
2956} // close namespace bslalg
2957
2958namespace bslma {
2959
2960template <class KEY, class HASH, class EQUAL, class ALLOCATOR>
2961struct UsesBslmaAllocator<bsl::unordered_multiset<KEY,
2962 HASH,
2963 EQUAL,
2964 ALLOCATOR> >
2965 : bsl::is_convertible<Allocator*, ALLOCATOR>::type
2966{};
2967
2968} // close namespace bslma
2969
2970
2971
2972#else // if ! defined(DEFINED_BSLSTL_UNORDEREDMULTISET_H)
2973# error Not valid except when included from bslstl_unorderedmultiset.h
2974#endif // ! defined(COMPILING_BSLSTL_UNORDEREDMULTISET_H)
2975
2976#endif // ! defined(INCLUDED_BSLSTL_UNORDEREDMULTISET_CPP03)
2977
2978// ----------------------------------------------------------------------------
2979// Copyright 2013 Bloomberg Finance L.P.
2980//
2981// Licensed under the Apache License, Version 2.0 (the "License");
2982// you may not use this file except in compliance with the License.
2983// You may obtain a copy of the License at
2984//
2985// http://www.apache.org/licenses/LICENSE-2.0
2986//
2987// Unless required by applicable law or agreed to in writing, software
2988// distributed under the License is distributed on an "AS IS" BASIS,
2989// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2990// See the License for the specific language governing permissions and
2991// limitations under the License.
2992// ----------------------------- END-OF-FILE ----------------------------------
2993
2994/** @} */
2995/** @} */
2996/** @} */
#define BSLMF_NESTED_TRAIT_DECLARATION_IF(t_TYPE, t_TRAIT, t_COND)
Definition bslmf_nestedtraitdeclaration.h:243
Definition bslma_bslallocator.h:580
Definition bslstl_pair.h:1210
Definition bslstl_unorderedmultiset.h:770
void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2272
void reserve(size_type numElements)
Definition bslstl_unorderedmultiset.h:2441
size_type bucket_count() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2560
const value_type & const_reference
Definition bslstl_unorderedmultiset.h:823
friend bool operator==(const unordered_multiset< KEY2, HASH2, EQUAL2, ALLOCATOR2 > &, const unordered_multiset< KEY2, HASH2, EQUAL2, ALLOCATOR2 > &)
::BloombergLP::bslstl::HashTableIterator< const value_type, difference_type > iterator
Definition bslstl_unorderedmultiset.h:831
KEY value_type
Definition bslstl_unorderedmultiset.h:818
AllocatorTraits::const_pointer const_pointer
Definition bslstl_unorderedmultiset.h:828
size_type bucket_size(size_type index) const
Definition bslstl_unorderedmultiset.h:2569
size_type bucket(const key_type &key) const
Definition bslstl_unorderedmultiset.h:2551
AllocatorTraits::difference_type difference_type
Definition bslstl_unorderedmultiset.h:826
size_type max_bucket_count() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2678
iterator const_iterator
Definition bslstl_unorderedmultiset.h:836
local_iterator const_local_iterator
Definition bslstl_unorderedmultiset.h:837
EQUAL key_eq() const
Definition bslstl_unorderedmultiset.h:2655
HASH hash_function() const
Definition bslstl_unorderedmultiset.h:2647
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, iterator >::type find(const LOOKUP_KEY &key)
Definition bslstl_unorderedmultiset.h:1203
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2244
size_type max_size() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2638
unordered_multiset &operator=(BloombergLP::bslmf::MovableRef< unordered_multiset > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2236
bool empty() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2620
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, pair< iterator, iterator > >::type equal_range(const LOOKUP_KEY &key)
Definition bslstl_unorderedmultiset.h:1140
size_type erase(const key_type &key)
Definition bslstl_unorderedmultiset.h:2309
iterator insert(const value_type &value)
Definition bslstl_unorderedmultiset.h:2359
AllocatorTraits::size_type size_type
Definition bslstl_unorderedmultiset.h:825
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition bslstl_unorderedmultiset.h:2224
AllocatorTraits::pointer pointer
Definition bslstl_unorderedmultiset.h:827
void rehash(size_type numBuckets)
Definition bslstl_unorderedmultiset.h:2433
iterator emplace(Args &&... args)
Definition bslstl_unorderedmultiset.h:2213
bool contains(const key_type &key) const
Definition bslstl_unorderedmultiset.h:2610
float load_factor() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2687
value_type & reference
Definition bslstl_unorderedmultiset.h:822
float max_load_factor() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2695
HASH hasher
Definition bslstl_unorderedmultiset.h:819
const_iterator cend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2499
::BloombergLP::bslstl::HashTableBucketIterator< const value_type, difference_type > local_iterator
Definition bslstl_unorderedmultiset.h:834
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this unordered multiset.
Definition bslstl_unorderedmultiset.h:2629
EQUAL key_equal
Definition bslstl_unorderedmultiset.h:820
ALLOCATOR allocator_type
Definition bslstl_unorderedmultiset.h:821
void swap(unordered_multiset &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits ALLOCATOR get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:1374
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, size_type >::type count(const LOOKUP_KEY &key) const
Definition bslstl_unorderedmultiset.h:1465
KEY key_type
Definition bslstl_unorderedmultiset.h:817
unordered_multiset()
Definition bslstl_unorderedmultiset.h:1942
const_iterator cbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmultiset.h:2490
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2012
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
#define BSLS_KEYWORD_NOEXCEPT_OPERATOR(...)
Definition bsls_keyword.h:635
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:632
#define BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(...)
Definition bsls_keyword.h:634
void swap(OptionValue &a, OptionValue &b)
bsl::size_t size(const TYPE &array)
Return the number of elements in the specified array.
Definition bdlb_printmethods.h:283
void swap(array< VALUE_TYPE, SIZE > &lhs, array< VALUE_TYPE, SIZE > &rhs)
deque< VALUE_TYPE, ALLOCATOR >::size_type erase(deque< VALUE_TYPE, ALLOCATOR > &deq, const BDE_OTHER_TYPE &value)
Definition bslstl_deque.h:4126
T::iterator begin(T &container)
Definition bslstl_iterator.h:1495
bool operator==(const memory_resource &a, const memory_resource &b)
T::iterator end(T &container)
Definition bslstl_iterator.h:1523
deque< VALUE_TYPE, ALLOCATOR >::size_type erase_if(deque< VALUE_TYPE, ALLOCATOR > &deq, PREDICATE predicate)
Definition bslstl_deque.h:4135
bool operator!=(const memory_resource &a, const memory_resource &b)
Definition bdlc_flathashmap.h:1805
Definition balxml_encoderoptions.h:68
Definition bdlbb_blob.h:576
Definition bdldfp_decimal.h:5188
Definition bslma_allocatortraits.h:1061
BloombergLP::bslma::AllocatorTraits_ConstPointerType< ALLOCATOR >::type const_pointer
Definition bslma_allocatortraits.h:1152
BloombergLP::bslma::AllocatorTraits_SizeType< ALLOCATOR >::type size_type
Definition bslma_allocatortraits.h:1165
BloombergLP::bslma::AllocatorTraits_PointerType< ALLOCATOR >::type pointer
Definition bslma_allocatortraits.h:1149
BloombergLP::bslma::AllocatorTraits_DifferenceType< ALLOCATOR >::type difference_type
Definition bslma_allocatortraits.h:1162
Definition bslstl_equalto.h:311
Definition bslstl_hash.h:498
Definition bslmf_isconvertible.h:867
t_TYPE type
Definition bslmf_typeidentity.h:216