BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl_unorderedmap_cpp03.h
Go to the documentation of this file.
1/// @file bslstl_unorderedmap_cpp03.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslstl_unorderedmap_cpp03.h -*-C++-*-
8
9// Automatically generated file. **DO NOT EDIT**
10
11#ifndef INCLUDED_BSLSTL_UNORDEREDMAP_CPP03
12#define INCLUDED_BSLSTL_UNORDEREDMAP_CPP03
13
14/// @defgroup bslstl_unorderedmap_cpp03 bslstl_unorderedmap_cpp03
15/// @brief Provide C++03 implementation for bslstl_unorderedmap.h
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslstl
19/// @{
20/// @addtogroup bslstl_unorderedmap_cpp03
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslstl_unorderedmap_cpp03-purpose"> Purpose</a>
25/// * <a href="#bslstl_unorderedmap_cpp03-classes"> Classes </a>
26/// * <a href="#bslstl_unorderedmap_cpp03-description"> Description </a>
27///
28/// # Purpose {#bslstl_unorderedmap_cpp03-purpose}
29/// Provide C++03 implementation for bslstl_unorderedmap.h
30///
31/// # Classes {#bslstl_unorderedmap_cpp03-classes}
32/// See bslstl_unorderedmap.h for list of classes
33///
34/// @see bslstl_unorderedmap
35///
36/// # Description {#bslstl_unorderedmap_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_unorderedmap.h
49/// @}
50/** @} */
51/** @} */
52
53/** @addtogroup bsl
54 * @{
55 */
56/** @addtogroup bslstl
57 * @{
58 */
59/** @addtogroup bslstl_unorderedmap_cpp03
60 * @{
61 */
62
63#ifdef COMPILING_BSLSTL_UNORDEREDMAP_H
64
65namespace bsl {
66
67 // ===================
68 // class unordered_map
69 // ===================
70
71/// This class template implements a value-semantic container type holding
72/// an unordered set of `KEY-VALUE` pairs having unique keys that provide a
73/// mapping from keys (of template parameter type `KEY`) to their associated
74/// mapped values (of template parameter type `VALUE`).
75///
76/// This class:
77/// * supports a complete set of *value-semantic* operations
78/// * is *exception-neutral* (agnostic except for the `at` method)
79/// * is *alias-safe*
80/// * is `const` *thread-safe*
81/// For terminology see @ref bsldoc_glossary .
82///
83/// See @ref bslstl_unorderedmap_cpp03
84template <class KEY,
85 class VALUE,
86 class HASH = bsl::hash<KEY>,
87 class EQUAL = bsl::equal_to<KEY>,
89class unordered_map {
90
91 private:
92 // PRIVATE TYPES
93
94 /// This `typedef` is an alias for the allocator traits type associated
95 /// with this container.
96 typedef bsl::allocator_traits<ALLOCATOR> AllocatorTraits;
97
98 /// This `typedef` is an alias for the type of key-value pair objects
99 /// maintained by this unordered map.
100 typedef bsl::pair<const KEY, VALUE> ValueType;
101
102 /// This `typedef` is an alias for the policy used internally by this
103 /// unordered map to extract the `KEY` value from the key-value pair
104 /// objects maintained by this unordered map.
105 typedef BloombergLP::bslstl::UnorderedMapKeyConfiguration<const KEY,
106 ValueType>
107 ListConfiguration;
108
109 /// This typedef is an alias for the template instantiation of the
110 /// underlying `bslstl::HashTable` used to implement this container.
111 typedef BloombergLP::bslstl::HashTable<ListConfiguration,
112 HASH,
113 EQUAL,
114 ALLOCATOR> HashTable;
115
116 /// This typedef is an alias for the type of links maintained by the
117 /// linked list of elements held by the underlying `bslstl::HashTable`.
118 typedef BloombergLP::bslalg::BidirectionalLink HashTableLink;
119
120 /// This typedef is an alias for the type of nodes that hold the values
121 /// in this unordered map.
122 typedef typename HashTable::NodeType HashTableNode;
123
124 /// This typedef is a convenient alias for the utility associated with
125 /// movable references.
126 typedef BloombergLP::bslmf::MovableRefUtil MoveUtil;
127
128 // FRIENDS
129 template <class KEY2,
130 class VALUE2,
131 class HASH2,
132 class EQUAL2,
133 class ALLOCATOR2>
134 friend bool operator==(
135 const unordered_map<KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2>&,
136 const unordered_map<KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2>&);
137
138 public:
139 // TRAITS
140
141 // PUBLIC TYPES
142 typedef KEY key_type;
143 typedef VALUE mapped_type;
145 typedef HASH hasher;
146 typedef EQUAL key_equal;
147 typedef ALLOCATOR allocator_type;
148
149 typedef value_type& reference;
150 typedef const value_type& const_reference;
151
152 typedef typename AllocatorTraits::size_type size_type;
154 typedef typename AllocatorTraits::pointer pointer;
156
157 typedef BloombergLP::bslstl::HashTableIterator<
159 typedef BloombergLP::bslstl::HashTableIterator<
161 typedef BloombergLP::bslstl::HashTableBucketIterator<
163 typedef BloombergLP::bslstl::HashTableBucketIterator<
165
166 private:
167 // DATA
168 HashTable d_impl; // underlying hash table used by this unordered map
169
170 public:
171 // CREATORS
172
173 explicit
174 unordered_map(size_type initialNumBuckets,
175 const HASH& hashFunction = HASH(),
176 const EQUAL& keyEqual = EQUAL(),
177 const ALLOCATOR& basicAllocator = ALLOCATOR());
178 unordered_map(size_type initialNumBuckets,
179 const HASH& hashFunction,
180 const ALLOCATOR& basicAllocator);
181 unordered_map(size_type initialNumBuckets,
182 const ALLOCATOR& basicAllocator);
183 explicit
184 unordered_map(const ALLOCATOR& basicAllocator);
185 /// Create an empty unordered map having a `max_load_factor` of 1.0.
186 /// Optionally specify an `initialNumBuckets` indicating the minimum
187 /// initial size of the array of buckets of this unordered map. If
188 /// `initialNumBuckets` is not supplied, one empty bucket shall be used
189 /// and no memory allocated. Optionally specify a `hashFunction` used
190 /// to generate the hash values associated with the `KEY-VALUE` pairs
191 /// contained in this unordered map. If `hashFunction` is not supplied,
192 /// a default-constructed object of the (template parameter) type `HASH`
193 /// is used. Optionally specify a key-equality functor `keyEqual` used
194 /// to determine whether two keys are equivalent. If `keyEqual` is not
195 /// supplied, a default-constructed object of the (template parameter)
196 /// type `EQUAL` is used. Optionally specify the `basicAllocator` used
197 /// to supply memory. If `basicAllocator` is not supplied, a
198 /// default-constructed object of the (template parameter) type
199 /// `ALLOCATOR` is used. If the `ALLOCATOR` type is `bsl::allocator`
200 /// (the default), then `basicAllocator` shall be convertible to
201 /// `bslma::Allocator *`. If the `ALLOCATOR` type is `bsl::allocator`
202 /// and `basicAllocator` is not supplied, the currently installed
203 /// default allocator is used to supply memory. Note that more than
204 /// `initialNumBuckets` buckets may be created in order to preserve the
205 /// bucket allocation strategy of the hash-table (but never fewer).
207
208 /// Create an empty unordered map, having a `max_load_factor` of 1.0,
209 /// and then create a `value_type` object for each iterator in the range
210 /// starting at the specified `first` iterator and ending immediately
211 /// before the specified `last` iterator, by converting from the object
212 /// referred to by each iterator. Insert into this unordered map each
213 /// such object, ignoring those having a key that appears earlier in the
214 /// sequence. Optionally specify a minimum `initialNumBuckets`
215 /// indicating the minimum initial size of the array of buckets of this
216 /// unordered map. If `initialNumBuckets` is 0 or not supplied, and
217 /// `first` and `last` denote an empty range, a single empty bucket
218 /// shall be supplied. The actual number of buckets the unordered_map
219 /// is created with shall always be enough to accommodate the number of
220 /// elements of the range without exceeding the `max_load_factor`.
221 /// Optionally specify a `hashFunction` used to generate hash values
222 /// associated with the `KEY-VALUE` pairs contained in this unordered
223 /// map. If `hashFunction` is not supplied, a default-constructed
224 /// object of the (template parameter) type `HASH` is used. Optionally
225 /// specify a key-equality functor `keyEqual` used to verify that two
226 /// keys are equivalent. If `keyEqual` is not supplied, a
227 /// default-constructed object of the (template parameter) type `EQUAL`
228 /// is used. Optionally specify a `basicAllocator` used to supply
229 /// memory. If `basicAllocator` is not supplied, a default-constructed
230 /// object of the (template parameter) type `ALLOCATOR` is used. If
231 /// `ALLOCATOR` type is `bsl::allocator` (the default), then
232 /// `basicAllocator` shall be convertible to `bslma::Allocator *`. If
233 /// the `ALLOCATOR` type is `bsl::allocator` and `basicAllocator` is not
234 /// supplied, the currently installed default allocator is used to
235 /// supply memory. The (template parameter) type `INPUT_ITERATOR` shall
236 /// meet the requirements of an input iterator defined in the C++11
237 /// standard [24.2.3] providing access to values of a type convertible
238 /// to `value_type`. The behavior is undefined unless `first` and
239 /// `last` refer to a sequence of valid values where `first` is at a
240 /// position at or before `last`. Note that more than
241 /// `initialNumBuckets` buckets may be created in order to preserve the
242 /// bucket allocation strategy of the hash-table (but never fewer).
243 template <class INPUT_ITERATOR>
244 unordered_map(INPUT_ITERATOR first,
245 INPUT_ITERATOR last,
246 size_type initialNumBuckets = 0,
247 const HASH& hashFunction = HASH(),
248 const EQUAL& keyEqual = EQUAL(),
249 const ALLOCATOR& basicAllocator = ALLOCATOR());
250 template <class INPUT_ITERATOR>
251 unordered_map(INPUT_ITERATOR first,
252 INPUT_ITERATOR last,
253 size_type initialNumBuckets,
254 const HASH& hashFunction,
255 const ALLOCATOR& basicAllocator);
256 template <class INPUT_ITERATOR>
257 unordered_map(INPUT_ITERATOR first,
258 INPUT_ITERATOR last,
259 size_type initialNumBuckets,
260 const ALLOCATOR& basicAllocator);
261 template <class INPUT_ITERATOR>
262 unordered_map(INPUT_ITERATOR first,
263 INPUT_ITERATOR last,
264 const ALLOCATOR& basicAllocator);
265
266#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
267# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
268 template <
269 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
270 class = bsl::enable_if_t<
271 std::is_invocable_v<EQUAL, const KEY &, const KEY &>>,
272 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
273 >
274# endif
276 std::initializer_list<value_type> values,
277 size_type initialNumBuckets = 0,
278 const HASH& hashFunction = HASH(),
279 const EQUAL& keyEqual = EQUAL(),
280 const ALLOCATOR& basicAllocator = ALLOCATOR());
281# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
282 template <
283 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
284 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
285 >
286# endif
287 unordered_map(std::initializer_list<value_type> values,
288 size_type initialNumBuckets,
289 const HASH& hashFunction,
290 const ALLOCATOR& basicAllocator);
291# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
292 template <
293 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
294 >
295# endif
296 unordered_map(std::initializer_list<value_type> values,
297 size_type initialNumBuckets,
298 const ALLOCATOR& basicAllocator);
299# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
300 /// Create an empty unordered map, having a `max_load_factor` of 1.0,
301 /// and then create a `value_type` object for each in the range
302 /// specified by `values` argument, ignoring elements having a key that
303 /// appears earlier in the sequence. Optionally specify a minimum
304 /// `initialNumBuckets` indicating the minimum initial size of the array
305 /// of buckets of this unordered map. If `initialNumBuckets` is not
306 /// supplied and `values` is an empty list, a single empty bucket shall
307 /// be created. The actual number of buckets the unordered_map is
308 /// created with shall always be enough to accommodate the number of
309 /// elements in `values` without exceeding the `max_load_factor`.
310 /// Optionally specify a `hashFunction` used to generate hash values
311 /// associated with the `KEY-VALUE` pairs contained in this unordered
312 /// map. If `hashFunction` is not supplied, a default-constructed
313 /// object of the (template parameter) type `HASH` is used. Optionally
314 /// specify a key-equality functor `keyEqual` used to verify that two
315 /// keys are equivalent. If `keyEqual` is not supplied, a
316 /// default-constructed object of the (template parameter) type `EQUAL`
317 /// is used. Optionally specify a `basicAllocator` used to supply
318 /// memory. If `basicAllocator` is not supplied, a default-constructed
319 /// object of the (template parameter) type `ALLOCATOR` is used. If the
320 /// `ALLOCATOR` type is `bsl::allocator` (the default), then
321 /// `basicAllocator` shall be convertible to `bslma::Allocator *`. If
322 /// the `ALLOCATOR` type is `bsl::allocator` and `basicAllocator` is not
323 /// supplied, the currently installed default allocator is used to
324 /// supply memory. Note that more than `initialNumBuckets` buckets may
325 /// be created in order to preserve the bucket allocation strategy of
326 /// the hash-table (but never fewer).
327 template <
328 class = bsl::enable_if_t< bsl::IsStdAllocator_v<ALLOCATOR>>
329 >
330# endif
331 unordered_map(std::initializer_list<value_type> values,
332 const ALLOCATOR& basicAllocator);
333#endif
334
335 /// Create an unordered map having the same value, hasher, key-equality
336 /// comparator, and `max_load_factor` as the specified `original`. Use
337 /// the allocator returned by 'bsl::allocator_traits<ALLOCATOR>::
338 /// select_on_container_copy_construction(original.get_allocator())' to
339 /// supply memory. If the `ALLOCATOR` type is `bsl::allocator` (the
340 /// default), the currently installed default allocator is used to
341 /// supply memory.
342 unordered_map(const unordered_map& original);
343
344 /// Create an unordered map having the same value, hasher, key-equality
345 /// comparator, and `max_load_factor` as the specified `original`, and
346 /// using the specified `basicAllocator` to supply memory. If the
347 /// `ALLOCATOR` type is `bsl::allocator` (the default), then
348 /// `basicAllocator` shall be convertible to `bslma::Allocator *`.
350 const unordered_map& original,
351 const typename type_identity<ALLOCATOR>::type& basicAllocator);
352
353 /// Create an unordered map having the same value as the specified
354 /// `original` object by moving (in constant time) the contents of
355 /// `original` to the new unordered map. Use a copy of
356 /// `original.hash_function()` to generate hash values for the keys
357 /// contained in this unordered map. Use a copy of `original.key_eq()`
358 /// to verify that two keys are equivalent. The allocator associated
359 /// with `original` is propagated for use in the newly-created unordered
360 /// map. `original` is left in a valid but unspecified state.
362 BloombergLP::bslmf::MovableRef<unordered_map> original); // IMPLICIT
363
364 /// Create an unordered map having the same value, hasher, key-equality
365 /// comparator, and `max_load_factor` as the specified `original`. Use
366 /// the specified `basicAllocator` to supply memory. This method
367 /// requires that the (template parameter) type `value_type` be
368 /// `move-insertable` into this `unordered_map` (see {Requirements on
369 /// `value_type`}). Note that a `bslma::Allocator *` can be supplied
370 /// for `basicAllocator` if the (template parameter) `ALLOCATOR` type is
371 /// `bsl::allocator` (the default).
373 BloombergLP::bslmf::MovableRef<unordered_map> original,
374 const typename type_identity<ALLOCATOR>::type& basicAllocator);
375
376 /// Destroy this object and each of its elements.
377 ~unordered_map();
378
379 // MANIPULATORS
380
381 /// Assign to this object the value, hasher, key-equality functor, and
382 /// `max_load_factor` of the specified `rhs` object, propagate to this
383 /// object the allocator of `rhs` if the `ALLOCATOR` type has trait
384 /// `propagate_on_container_copy_assignment`, and return a reference
385 /// providing modifiable access to this object. Note that this method
386 /// requires that the (template parameter) types `KEY` and `VALUE` both
387 /// be `copy-constructible` (see {Requirements on `value_type`}).
388 unordered_map& operator=(const unordered_map& rhs);
389
390 /// Assign to this object the value, hash function, and key-equality
391 /// comparator of the specified `rhs` object, propagate to this object
392 /// the allocator of `rhs` if the `ALLOCATOR` type has trait
393 /// `propagate_on_container_move_assignment`, and return a reference
394 /// providing modifiable access to this object. The contents of `rhs`
395 /// are moved (in constant time) to this unordered map if
396 /// `get_allocator() == rhs.get_allocator()` (after accounting for the
397 /// aforementioned trait); otherwise, all elements in this container are
398 /// either destroyed or move-assigned to, and each additional element in
399 /// `rhs` is move-inserted into this unordered_map. `rhs` is left in a
400 /// valid but unspecified state, and if an exception is thrown, `*this`
401 /// is left in a valid but unspecified state. This method requires that
402 /// the type `value_type` be `move-constructible` (see {Requirements on
403 /// `value_type`}).
405 operator=(BloombergLP::bslmf::MovableRef<unordered_map> rhs)
407 AllocatorTraits::is_always_equal::value &&
408 std::is_nothrow_move_assignable<HASH>::value &&
409 std::is_nothrow_move_assignable<EQUAL>::value);
410
411#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
412 /// Assign to this unordered map the value of the of the specified
413 /// initializer list `rhs`, and return a reference providing modifiable
414 /// access to this object. This method requires that the (template
415 /// parameter) type `value_type` be `copy-insertable` into this list.
416 unordered_map& operator=(std::initializer_list<value_type> rhs);
417#endif
418
419 /// Return a reference providing modifiable access to the mapped-value
420 /// associated with the specified `key` in this unordered map; if this
421 /// unordered map does not already contain a `value_type` object with
422 /// `key`, first insert a new `value_type` object having `key` and a
423 /// default-constructed `VALUE` object. Note that this method requires
424 /// that the (template parameter) type `KEY` is `copy-constructible` and
425 /// the (template parameter) `VALUE` is "default-constructible" (see
426 /// {Requirements on `value_type`}).
427 typename add_lvalue_reference<VALUE>::type operator[](const key_type& key);
428
429 /// Return a reference providing modifiable access to the mapped-value
430 /// associated with the specified `key` in this unordered map; if this
431 /// unordered map does not already contain a `value_type` object with
432 /// `key`, first insert a new `value_type` object having `key` and a
433 /// default-constructed `VALUE` object. Note that this method requires
434 /// that the (template parameter) `VALUE` is "default-constructible"
435 /// (see {Requirements on `value_type`}). Note that `key` may be
436 /// modified; it is guaranteed to be left in a valid state.
437 typename add_lvalue_reference<VALUE>::type operator[](
438 BloombergLP::bslmf::MovableRef<key_type> key);
439
440 /// Return a reference providing modifiable access to the mapped-value
441 /// associated with the specified `key`, if such an entry exists;
442 /// otherwise throw `std::out_of_range` exception. Note that this
443 /// method is not exception-neutral.
444 typename add_lvalue_reference<VALUE>::type at(const key_type& key);
445
446 /// Return an iterator providing modifiable access to the first
447 /// `value_type` object in the sequence of `value_type` objects
448 /// maintained by this unordered map, or the `end` iterator if this
449 /// unordered map is empty.
451
452 /// Return an iterator providing modifiable access to the past-the-end
453 /// position in the sequence of `value_type` objects maintained by this
454 /// unordered map.
456
457 /// Return a local iterator providing modifiable access to the first
458 /// `value_type` object in the sequence of `value_type` objects of the
459 /// bucket having the specified `index` in the array of buckets
460 /// maintained by this unordered map, or the `end(index)` iterator if
461 /// the bucket is empty. The behavior is undefined unless 'index <
462 /// bucket_count()'.
463 local_iterator begin(size_type index);
464
465 /// Return a local iterator providing modifiable access to the
466 /// past-the-end position in the sequence of `value_type` objects of the
467 /// bucket having the specified `index` in the array of buckets
468 /// maintained by this unordered map. The behavior is undefined unless
469 /// `index < bucket_count()`.
470 local_iterator end(size_type index);
471
472 /// Remove all entries from this unordered map. Note that this
473 /// unordered map will be empty after calling this method, but allocated
474 /// memory may be retained for future use.
476
477#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
478// {{{ BEGIN GENERATED CODE
479// Command line: sim_cpp11_features.pl bslstl_unorderedmap.h
480#ifndef BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT
481#define BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT 10
482#endif
483#ifndef BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A
484#define BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT
485#endif
486#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 0
487 pair<iterator, bool> emplace(
488 );
489#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 0
490
491#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 1
492 template <class Args_01>
493 pair<iterator, bool> emplace(
494 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01);
495#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 1
496
497#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 2
498 template <class Args_01,
499 class Args_02>
500 pair<iterator, bool> emplace(
501 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
502 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02);
503#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 2
504
505#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 3
506 template <class Args_01,
507 class Args_02,
508 class Args_03>
509 pair<iterator, bool> emplace(
510 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
511 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
512 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03);
513#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 3
514
515#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 4
516 template <class Args_01,
517 class Args_02,
518 class Args_03,
519 class Args_04>
520 pair<iterator, bool> emplace(
521 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
522 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
523 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
524 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04);
525#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 4
526
527#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 5
528 template <class Args_01,
529 class Args_02,
530 class Args_03,
531 class Args_04,
532 class Args_05>
533 pair<iterator, bool> emplace(
534 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
535 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
536 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
537 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
538 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05);
539#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 5
540
541#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 6
542 template <class Args_01,
543 class Args_02,
544 class Args_03,
545 class Args_04,
546 class Args_05,
547 class Args_06>
548 pair<iterator, bool> emplace(
549 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
550 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
551 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
552 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
553 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
554 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06);
555#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 6
556
557#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 7
558 template <class Args_01,
559 class Args_02,
560 class Args_03,
561 class Args_04,
562 class Args_05,
563 class Args_06,
564 class Args_07>
565 pair<iterator, bool> emplace(
566 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
567 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
568 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
569 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
570 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
571 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
572 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07);
573#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 7
574
575#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 8
576 template <class Args_01,
577 class Args_02,
578 class Args_03,
579 class Args_04,
580 class Args_05,
581 class Args_06,
582 class Args_07,
583 class Args_08>
584 pair<iterator, bool> emplace(
585 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
586 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
587 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
588 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
589 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
590 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
591 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
592 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08);
593#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 8
594
595#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 9
596 template <class Args_01,
597 class Args_02,
598 class Args_03,
599 class Args_04,
600 class Args_05,
601 class Args_06,
602 class Args_07,
603 class Args_08,
604 class Args_09>
605 pair<iterator, bool> emplace(
606 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
607 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
608 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
609 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
610 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
611 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
612 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
613 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
614 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09);
615#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 9
616
617#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 10
618 template <class Args_01,
619 class Args_02,
620 class Args_03,
621 class Args_04,
622 class Args_05,
623 class Args_06,
624 class Args_07,
625 class Args_08,
626 class Args_09,
627 class Args_10>
628 pair<iterator, bool> emplace(
629 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
630 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
631 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
632 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
633 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
634 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
635 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
636 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
637 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
638 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10);
639#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 10
640
641
642#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 0
643 iterator emplace_hint(const_iterator hint);
644#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 0
645
646#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 1
647 template <class Args_01>
648 iterator emplace_hint(const_iterator hint,
649 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01);
650#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 1
651
652#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 2
653 template <class Args_01,
654 class Args_02>
655 iterator emplace_hint(const_iterator hint,
656 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
657 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02);
658#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 2
659
660#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 3
661 template <class Args_01,
662 class Args_02,
663 class Args_03>
664 iterator emplace_hint(const_iterator hint,
665 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
666 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
667 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03);
668#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 3
669
670#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 4
671 template <class Args_01,
672 class Args_02,
673 class Args_03,
674 class Args_04>
675 iterator emplace_hint(const_iterator hint,
676 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
677 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
678 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
679 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04);
680#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 4
681
682#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 5
683 template <class Args_01,
684 class Args_02,
685 class Args_03,
686 class Args_04,
687 class Args_05>
688 iterator emplace_hint(const_iterator hint,
689 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
690 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
691 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
692 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
693 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05);
694#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 5
695
696#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 6
697 template <class Args_01,
698 class Args_02,
699 class Args_03,
700 class Args_04,
701 class Args_05,
702 class Args_06>
703 iterator emplace_hint(const_iterator hint,
704 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
705 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
706 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
707 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
708 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
709 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06);
710#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 6
711
712#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 7
713 template <class Args_01,
714 class Args_02,
715 class Args_03,
716 class Args_04,
717 class Args_05,
718 class Args_06,
719 class Args_07>
720 iterator emplace_hint(const_iterator hint,
721 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
722 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
723 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
724 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
725 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
726 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
727 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07);
728#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 7
729
730#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 8
731 template <class Args_01,
732 class Args_02,
733 class Args_03,
734 class Args_04,
735 class Args_05,
736 class Args_06,
737 class Args_07,
738 class Args_08>
739 iterator emplace_hint(const_iterator hint,
740 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
741 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
742 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
743 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
744 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
745 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
746 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
747 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08);
748#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 8
749
750#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 9
751 template <class Args_01,
752 class Args_02,
753 class Args_03,
754 class Args_04,
755 class Args_05,
756 class Args_06,
757 class Args_07,
758 class Args_08,
759 class Args_09>
760 iterator emplace_hint(const_iterator hint,
761 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
762 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
763 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
764 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
765 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
766 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
767 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
768 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
769 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09);
770#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 9
771
772#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 10
773 template <class Args_01,
774 class Args_02,
775 class Args_03,
776 class Args_04,
777 class Args_05,
778 class Args_06,
779 class Args_07,
780 class Args_08,
781 class Args_09,
782 class Args_10>
783 iterator emplace_hint(const_iterator hint,
784 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
785 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
786 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
787 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
788 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
789 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
790 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
791 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
792 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
793 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10);
794#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_A >= 10
795
796#else
797// The generated code below is a workaround for the absence of perfect
798// forwarding in some compilers.
799 template <class... Args>
800 pair<iterator, bool> emplace(
801 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... args);
802
803 template <class... Args>
804 iterator emplace_hint(const_iterator hint,
805 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... args);
806// }}} END GENERATED CODE
807#endif
808
809 iterator erase(const_iterator position);
810 /// Remove from this unordered map the `value_type` object at the
811 /// specified `position`, and return an iterator referring to the
812 /// element immediately following the removed element, or to the
813 /// past-the-end position if the removed element was the last element in
814 /// the sequence of elements maintained by this unordered map. This
815 /// method invalidates only iterators and references to the removed
816 /// element and previously saved values of the `end()` iterator, and
817 /// preserves the relative order of the elements not removed. The
818 /// behavior is undefined unless `position` refers to a `value_type`
819 /// object in this unordered map.
820 iterator erase(iterator position);
821
822 /// Remove from this unordered map the `value_type` object having the
823 /// specified `key`, if it exists, and return 1; otherwise (there is no
824 /// object with a key equivalent to `key` in this unordered map) return
825 /// 0 with no other effect. This method invalidates only iterators and
826 /// references to the removed element and previously saved values of the
827 /// `end()` iterator, and preserves the relative order of the elements
828 /// not removed.
829 size_type erase(const key_type& key);
830
831 /// Remove from this unordered map the `value_type` objects starting at
832 /// the specified `first` position up to, but not including, the
833 /// specified `last` position, and return `last`. This method
834 /// invalidates only iterators and references to the removed element and
835 /// previously saved values of the `end()` iterator, and preserves the
836 /// relative order of the elements not removed. The behavior is
837 /// undefined unless `first` and `last` either refer to elements in this
838 /// unordered map or are the `end` iterator, and the `first` position is
839 /// at or before the `last` position in the iteration sequence provided
840 /// by this container.
841 iterator erase(const_iterator first, const_iterator last);
842
843 /// Return an iterator providing modifiable access to the `value_type`
844 /// object in this unordered map with a key equivalent to the specified
845 /// `key`, if such an entry exists, and the past-the-end iterator
846 /// (`end`) otherwise. The behavior is undefined unless `key` is
847 /// equivalent to the key of at most one element in this unordered map.
848 template <class LOOKUP_KEY>
849 typename enable_if<
850 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
851 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
852 iterator>::type
853 find(const LOOKUP_KEY& key)
854 {
855 // Note: implemented inline due to Sun CC compilation error.
856 return iterator(d_impl.find(key));
857 }
858
859 /// Return an iterator providing modifiable access to the `value_type`
860 /// object in this unordered map with a key equivalent to the specified
861 /// `key`, if such an entry exists, and the past-the-end iterator
862 /// (`end`) otherwise.
863 iterator find(const key_type& key);
864
865 /// Insert the specified `value` into this unordered map if the key (the
866 /// `first` element) of the object referred to by `value` does not
867 /// already exist in this unordered map; otherwise, this method has no
868 /// effect (a `value_type` object having the key equivalent to the key
869 /// of `value` already exists in this unordered map). Return a `pair`
870 /// whose `first` member is an iterator referring to the (possibly newly
871 /// inserted) `value_type` object in this unordered map whose key is
872 /// equivalent to that of the object to be inserted, and whose `second`
873 /// member is `true` if a new value was inserted, and `false` if a value
874 /// having an equivalent key was already present. Note that this method
875 /// requires that the (template parameter) types `KEY` and `VALUE` both
876 /// be `copy-insertable` into this unordered map (see {Requirements on
877 /// `value_type`}).
878 pair<iterator, bool> insert(const value_type& value);
879
880#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
881 template <class ALT_VALUE_TYPE>
882 pair<iterator, bool>
883#elif !defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
884 template <class ALT_VALUE_TYPE>
885 typename enable_if<is_convertible<ALT_VALUE_TYPE, value_type>::value,
886 pair<iterator, bool> >::type
887#else
888 /// Insert the specified `value` into this unordered map if the key (the
889 /// `first` element) of the object referred to by `value` does not
890 /// already exist in this unordered map; otherwise, this method has no
891 /// effect (a `value_type` object having the same key as the converted
892 /// `value` already exists in this unordered map) . Return a `pair`
893 /// whose `first` member is an iterator referring to the (possibly newly
894 /// inserted) `value_type` object in this unordered map whose key is the
895 /// equivalent to that of the object to be inserted, and whose `second`
896 /// member is `true` if a new value was inserted, and `false` if a value
897 /// having an equivalent key was already present. Note that this method
898 /// requires that the (template parameter) types `KEY` and `VALUE` both
899 /// be `move-constructible` (see {Requirements on `value_type`}), and
900 /// that the `value_type` be constructible from the (template parameter)
901 /// `ALT_VALUE_TYPE`. Also note that this one template stands in for
902 /// three `insert` functions in the C++11 standard.
903 template <class ALT_VALUE_TYPE>
904 typename enable_if<std::is_constructible<value_type,
905 ALT_VALUE_TYPE&&>::value,
906 pair<iterator, bool> >::type
907#endif
908 insert(BSLS_COMPILERFEATURES_FORWARD_REF(ALT_VALUE_TYPE) value)
909 {
910 // Note that some compilers require functions declared with `enable_if`
911 // to be defined inline.
912
913 typedef bsl::pair<iterator, bool> ResultType;
914
915 bool isInsertedFlag = false;
916
917 HashTableLink *result = d_impl.insertIfMissing(
918 &isInsertedFlag,
919 BSLS_COMPILERFEATURES_FORWARD(ALT_VALUE_TYPE, value));
920
921 return ResultType(iterator(result), isInsertedFlag);
922 }
923
924 /// Insert the specified `value` into this unordered map if the key (the
925 /// `first` element) of the object referred to by `value` does not
926 /// already exist in this unordered map; otherwise, this method has no
927 /// effect (a `value_type` object having the key equivalent to the key
928 /// of `value` already exists in this unordered map). Return an
929 /// iterator referring to ether the newly inserted `value_type` object
930 /// or to the existing object whose key is equivalent to the key of
931 /// `value`. The average and worst case complexity of this operation is
932 /// not affected by the specified `hint`. This method requires that the
933 /// (template parameter) types `KEY` and `VALUE` both be
934 /// `copy-insertable` into this unordered map (see {Requirements on
935 /// `value_type`}). The behavior is undefined unless `hint` is an
936 /// iterator in the range `[begin() .. end()]` (both endpoints
937 /// included). Note that `hint` is ignored (other than possibly
938 /// asserting its validity in some build modes).
939 iterator insert(const_iterator hint, const value_type& value);
940
941#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
942 template <class ALT_VALUE_TYPE>
944#elif !defined(BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER)
945 template <class ALT_VALUE_TYPE>
946 typename enable_if<is_convertible<ALT_VALUE_TYPE, value_type>::value,
947 iterator>::type
948#else
949 /// Insert the specified `value` into this unordered map if the key (the
950 /// `first` element) of the object referred to by `value` does not
951 /// already exist in this unordered map; otherwise, this method has no
952 /// effect (a `value_type` object having the same key as the converted
953 /// `value` already exists in this unordered map) . Return an iterator
954 /// referring to ether the newly inserted) `value_type` object or to the
955 /// existing object whose key is equivalent to the key of `value`. The
956 /// average and worst case complexity of this operation is not affected
957 /// by the specified `hint`. This method requires that the (template
958 /// parameter) types `KEY` and `VALUE` both be `move-constructible` (see
959 /// {Requirements on `value_type`}) and that the `value_type` be
960 /// constructible from the (template parameter) `ALT_VALUE_TYPE`. The
961 /// behavior is undefined unless `hint` is an iterator in the range
962 /// `[begin() .. end()]` (both endpoints included). Note that `hint` is
963 /// ignored (other than possibly asserting its validity in some build
964 /// modes). Also note that this one template stands in for three
965 /// `insert` functions in the C++11 standard.
966 template <class ALT_VALUE_TYPE>
967 typename enable_if<std::is_constructible<value_type,
968 ALT_VALUE_TYPE&&>::value,
969 iterator>::type
970#endif
972 BSLS_COMPILERFEATURES_FORWARD_REF(ALT_VALUE_TYPE) value)
973 {
974 // Note that some compilers require functions declared with 'enable_if'
975 // to be defined inline.
976
977 // There is no realistic use-case for the 'hint' in an 'unordered_map'
978 // of unique values. We could quickly test for a duplicate key, and
979 // have a fast return path for when the method fails, but in the
980 // typical use case where a new element is inserted, we are adding an
981 // extra key check for no benefit. In order to insert an element into
982 // a bucket, we need to walk the whole bucket looking for duplicates,
983 // and the hint is no help in finding the start of a bucket.
984
985 (void)hint; // suppress 'unused' warnings
986
987 bool isInsertedFlag; // not used
988
989 HashTableLink *result = d_impl.insertIfMissing(
990 &isInsertedFlag,
991 BSLS_COMPILERFEATURES_FORWARD(ALT_VALUE_TYPE, value));
992
993 return iterator(result);
994 }
995
996 /// Create a `value_type` object for each iterator in the range starting
997 /// at the specified `first` iterator and ending immediately before the
998 /// specified `last` iterator, by converting from the object referred to
999 /// by each iterator. Insert into this unordered map each such object
1000 /// whose key is not already contained. The (template parameter) type
1001 /// `INPUT_ITERATOR` shall meet the requirements of an input iterator
1002 /// defined in the C++11 standard [24.2.3] providing access to values of
1003 /// a type convertible to `value_type`. The behavior is undefined
1004 /// unless `first` and `last` refer to a sequence of valid values where
1005 /// `first` is at a position at or before `last`. Note that this method
1006 /// requires that the (template parameter) types `KEY` and `VALUE` both
1007 /// be `copy-constructible` (see {Requirements on `value_type`}).
1008 template <class INPUT_ITERATOR>
1009 void insert(INPUT_ITERATOR first, INPUT_ITERATOR last);
1010
1011#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1012 /// Create a `value_type` object for each element in the specified
1013 /// `values`. Insert into this unordered map each such object whose key
1014 /// is not already contained. Note that this method requires that the
1015 /// (template parameter) types `KEY` and `VALUE` both be
1016 /// `copy-constructible` (see {Requirements on `value_type`}).
1017 void insert(std::initializer_list<value_type> values);
1018#endif
1019
1020#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1021// {{{ BEGIN GENERATED CODE
1022// Command line: sim_cpp11_features.pl bslstl_unorderedmap.h
1023#ifndef BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT
1024#define BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT 10
1025#endif
1026#ifndef BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_B
1027#define BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_B BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT
1028#endif
1029 template <class BDE_OTHER_TYPE>
1030 pair<iterator, bool> insert_or_assign(const KEY& key,
1031 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj);
1032
1033 template <class BDE_OTHER_TYPE>
1034 pair<iterator, bool> insert_or_assign(
1035 BloombergLP::bslmf::MovableRef<KEY> key,
1036 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj);
1037
1038 template <class BDE_OTHER_TYPE>
1040 const KEY& key,
1041 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj);
1042
1043 template <class BDE_OTHER_TYPE>
1045 BloombergLP::bslmf::MovableRef<KEY> key,
1046 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj);
1047#else
1048// The generated code below is a workaround for the absence of perfect
1049// forwarding in some compilers.
1050 template <class BDE_OTHER_TYPE>
1051 pair<iterator, bool> insert_or_assign(const KEY& key,
1052 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj);
1053
1054 template <class BDE_OTHER_TYPE>
1055 pair<iterator, bool> insert_or_assign(
1056 BloombergLP::bslmf::MovableRef<KEY> key,
1057 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj);
1058
1059 template <class BDE_OTHER_TYPE>
1061 const KEY& key,
1062 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj);
1063
1064 template <class BDE_OTHER_TYPE>
1066 BloombergLP::bslmf::MovableRef<KEY> key,
1067 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj);
1068
1069// }}} END GENERATED CODE
1070#endif
1071
1072 /// Return a pair of iterators providing modifiable access to the
1073 /// sequence of `value_type` objects in this unordered map having the
1074 /// specified `key`, where the first iterator is positioned at the start
1075 /// of the sequence, and the second is positioned one past the end of
1076 /// the sequence. If this unordered map contains no `value_type` object
1077 /// having `key`, then the two returned iterators will have the same
1078 /// value, `end()`. The behavior is undefined unless `key` is
1079 /// equivalent to at most one key in this unordered map. Note that
1080 /// since an unordered map maintains unique keys, the range will contain
1081 /// at most one element.
1082 ///
1083 /// Note: implemented inline due to Sun CC compilation error.
1084 template <class LOOKUP_KEY>
1085 typename enable_if<
1086 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1087 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
1088 pair<iterator, iterator> >::type
1089 equal_range(const LOOKUP_KEY& key)
1090 {
1091 typedef bsl::pair<iterator, iterator> ResultType;
1092
1093 HashTableLink *first = d_impl.find(key);
1094 return first
1095 ? ResultType(iterator(first), iterator(first->nextLink()))
1096 : ResultType(iterator(0), iterator(0));
1097 }
1098
1099 /// Return a pair of iterators providing modifiable access to the
1100 /// sequence of `value_type` objects in this unordered map having the
1101 /// specified `key`, where the first iterator is positioned at the start
1102 /// of the sequence, and the second is positioned one past the end of
1103 /// the sequence. If this unordered map contains no `value_type` object
1104 /// having `key`, then the two returned iterators will have the same
1105 /// value, `end()`. Note that since an unordered map maintains unique
1106 /// keys, the range will contain at most one element.
1107 pair<iterator, iterator> equal_range(const key_type& key);
1108
1109 /// Set the maximum load factor of this unordered map to the specified
1110 /// `newMaxLoadFactor`. If `newMaxLoadFactor < loadFactor()`, this
1111 /// operator will cause an immediate rehash (in violation of the C++11
1112 /// standard); otherwise, it has a constant-time cost. The behavior is
1113 /// undefined unless `0 < newMaxLoadFactor`.
1114 void max_load_factor(float newMaxLoadFactor);
1115
1116 /// Change the size of the array of buckets maintained by this unordered
1117 /// map to at least the specified `numBuckets`, and redistribute all the
1118 /// contained elements into the new sequence of buckets, according to
1119 /// their hash values. After this call, @ref load_factor will be less than
1120 /// or equal to `max_load_factor`. This operation has no effect if
1121 /// rehashing the elements into `numBuckets` would cause this map to
1122 /// exceed its `max_load_factor`.
1123 void rehash(size_type numBuckets);
1124
1125 /// Increase the number of buckets of this set to a quantity such that
1126 /// the ratio between the specified `numElements` and this quantity does
1127 /// not exceed `max_load_factor`. Note that this guarantees that, after
1128 /// the reserve, elements can be inserted to grow the container to
1129 /// `size() == numElements` without rehashing. Also note that memory
1130 /// allocations may still occur when growing the container to `size() ==
1131 /// numElements`. Also note that this operation has no effect if
1132 /// `numElements <= size()`.
1133 void reserve(size_type numElements);
1134
1135 /// Exchange the value, hasher, key-equality functor, and
1136 /// `max_load_factor` of this object with those of the specified `other`
1137 /// object; also exchange the allocator of this object with that of
1138 /// `other` if the (template parameter) type `ALLOCATOR` has the
1139 /// `propagate_on_container_swap` trait, and do not modify either
1140 /// allocator otherwise. This method provides the no-throw
1141 /// exception-safety guarantee if and only if both the (template
1142 /// parameter) types `HASH` and `EQUAL` provide no-throw swap
1143 /// operations; if an exception is thrown, both objects are left in
1144 /// valid but unspecified states. This operation guarantees `O[1]`
1145 /// complexity. The behavior is undefined unless either this object was
1146 /// created with the same allocator as `other` or `ALLOCATOR` has the
1147 /// `propagate_on_container_swap` trait.
1149 AllocatorTraits::is_always_equal::value &&
1150 bsl::is_nothrow_swappable<HASH>::value &&
1151 bsl::is_nothrow_swappable<EQUAL>::value);
1152
1153#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1154// {{{ BEGIN GENERATED CODE
1155// Command line: sim_cpp11_features.pl bslstl_unorderedmap.h
1156#ifndef BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT
1157#define BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT 10
1158#endif
1159#ifndef BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C
1160#define BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT
1161#endif
1162#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
1163 pair<iterator, bool> try_emplace(const KEY& key);
1164#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
1165
1166#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
1167 template <class Args_01>
1168 pair<iterator, bool> try_emplace(const KEY& key,
1169 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01);
1170#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
1171
1172#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
1173 template <class Args_01,
1174 class Args_02>
1175 pair<iterator, bool> try_emplace(const KEY& key,
1176 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1177 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02);
1178#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
1179
1180#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
1181 template <class Args_01,
1182 class Args_02,
1183 class Args_03>
1184 pair<iterator, bool> try_emplace(const KEY& key,
1185 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1186 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1187 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03);
1188#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
1189
1190#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
1191 template <class Args_01,
1192 class Args_02,
1193 class Args_03,
1194 class Args_04>
1195 pair<iterator, bool> try_emplace(const KEY& key,
1196 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1197 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1198 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1199 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04);
1200#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
1201
1202#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
1203 template <class Args_01,
1204 class Args_02,
1205 class Args_03,
1206 class Args_04,
1207 class Args_05>
1208 pair<iterator, bool> try_emplace(const KEY& key,
1209 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1210 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1211 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1212 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1213 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05);
1214#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
1215
1216#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
1217 template <class Args_01,
1218 class Args_02,
1219 class Args_03,
1220 class Args_04,
1221 class Args_05,
1222 class Args_06>
1223 pair<iterator, bool> try_emplace(const KEY& key,
1224 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1225 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1226 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1227 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1228 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1229 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06);
1230#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
1231
1232#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
1233 template <class Args_01,
1234 class Args_02,
1235 class Args_03,
1236 class Args_04,
1237 class Args_05,
1238 class Args_06,
1239 class Args_07>
1240 pair<iterator, bool> try_emplace(const KEY& key,
1241 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1242 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1243 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1244 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1245 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1246 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1247 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07);
1248#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
1249
1250#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
1251 template <class Args_01,
1252 class Args_02,
1253 class Args_03,
1254 class Args_04,
1255 class Args_05,
1256 class Args_06,
1257 class Args_07,
1258 class Args_08>
1259 pair<iterator, bool> try_emplace(const KEY& key,
1260 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1261 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1262 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1263 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1264 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1265 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1266 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
1267 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08);
1268#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
1269
1270#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
1271 template <class Args_01,
1272 class Args_02,
1273 class Args_03,
1274 class Args_04,
1275 class Args_05,
1276 class Args_06,
1277 class Args_07,
1278 class Args_08,
1279 class Args_09>
1280 pair<iterator, bool> try_emplace(const KEY& key,
1281 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1282 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1283 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1284 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1285 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1286 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1287 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
1288 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
1289 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09);
1290#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
1291
1292#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
1293 template <class Args_01,
1294 class Args_02,
1295 class Args_03,
1296 class Args_04,
1297 class Args_05,
1298 class Args_06,
1299 class Args_07,
1300 class Args_08,
1301 class Args_09,
1302 class Args_10>
1303 pair<iterator, bool> try_emplace(const KEY& key,
1304 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1305 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1306 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1307 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1308 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1309 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1310 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
1311 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
1312 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
1313 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10);
1314#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
1315
1316
1317#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
1318 pair<iterator, bool> try_emplace(
1319 BloombergLP::bslmf::MovableRef<KEY> key);
1320#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
1321
1322#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
1323 template <class Args_01>
1324 pair<iterator, bool> try_emplace(
1325 BloombergLP::bslmf::MovableRef<KEY> key,
1326 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01);
1327#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
1328
1329#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
1330 template <class Args_01,
1331 class Args_02>
1332 pair<iterator, bool> try_emplace(
1333 BloombergLP::bslmf::MovableRef<KEY> key,
1334 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1335 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02);
1336#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
1337
1338#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
1339 template <class Args_01,
1340 class Args_02,
1341 class Args_03>
1342 pair<iterator, bool> try_emplace(
1343 BloombergLP::bslmf::MovableRef<KEY> key,
1344 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1345 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1346 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03);
1347#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
1348
1349#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
1350 template <class Args_01,
1351 class Args_02,
1352 class Args_03,
1353 class Args_04>
1354 pair<iterator, bool> try_emplace(
1355 BloombergLP::bslmf::MovableRef<KEY> key,
1356 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1357 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1358 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1359 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04);
1360#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
1361
1362#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
1363 template <class Args_01,
1364 class Args_02,
1365 class Args_03,
1366 class Args_04,
1367 class Args_05>
1368 pair<iterator, bool> try_emplace(
1369 BloombergLP::bslmf::MovableRef<KEY> key,
1370 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1371 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1372 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1373 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1374 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05);
1375#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
1376
1377#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
1378 template <class Args_01,
1379 class Args_02,
1380 class Args_03,
1381 class Args_04,
1382 class Args_05,
1383 class Args_06>
1384 pair<iterator, bool> try_emplace(
1385 BloombergLP::bslmf::MovableRef<KEY> key,
1386 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1387 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1388 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1389 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1390 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1391 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06);
1392#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
1393
1394#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
1395 template <class Args_01,
1396 class Args_02,
1397 class Args_03,
1398 class Args_04,
1399 class Args_05,
1400 class Args_06,
1401 class Args_07>
1402 pair<iterator, bool> try_emplace(
1403 BloombergLP::bslmf::MovableRef<KEY> key,
1404 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1405 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1406 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1407 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1408 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1409 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1410 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07);
1411#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
1412
1413#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
1414 template <class Args_01,
1415 class Args_02,
1416 class Args_03,
1417 class Args_04,
1418 class Args_05,
1419 class Args_06,
1420 class Args_07,
1421 class Args_08>
1422 pair<iterator, bool> try_emplace(
1423 BloombergLP::bslmf::MovableRef<KEY> key,
1424 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1425 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1426 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1427 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1428 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1429 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1430 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
1431 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08);
1432#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
1433
1434#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
1435 template <class Args_01,
1436 class Args_02,
1437 class Args_03,
1438 class Args_04,
1439 class Args_05,
1440 class Args_06,
1441 class Args_07,
1442 class Args_08,
1443 class Args_09>
1444 pair<iterator, bool> try_emplace(
1445 BloombergLP::bslmf::MovableRef<KEY> key,
1446 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1447 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1448 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1449 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1450 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1451 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1452 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
1453 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
1454 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09);
1455#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
1456
1457#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
1458 template <class Args_01,
1459 class Args_02,
1460 class Args_03,
1461 class Args_04,
1462 class Args_05,
1463 class Args_06,
1464 class Args_07,
1465 class Args_08,
1466 class Args_09,
1467 class Args_10>
1468 pair<iterator, bool> try_emplace(
1469 BloombergLP::bslmf::MovableRef<KEY> key,
1470 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1471 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1472 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1473 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1474 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1475 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1476 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
1477 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
1478 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
1479 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10);
1480#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
1481
1482
1483#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
1484 template<class LOOKUP_KEY>
1485 typename bsl::enable_if<
1486 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1487 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1489 const_iterator>::value
1491 iterator>::value,
1492 pair<iterator, bool> >::type
1494 {
1495 typedef bsl::pair<iterator, bool> ResultType;
1496 bool isInsertedFlag = false;
1497 HashTableLink *result = d_impl.tryEmplace(
1498 &isInsertedFlag,
1499 NULL,
1500 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key));
1501
1502 return ResultType(iterator(result), isInsertedFlag);
1503 }
1504#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
1505
1506#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
1507 template<class LOOKUP_KEY, class Args_01>
1508 typename bsl::enable_if<
1509 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1510 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1512 const_iterator>::value
1514 iterator>::value,
1515 pair<iterator, bool> >::type
1517 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01)
1518 {
1519 typedef bsl::pair<iterator, bool> ResultType;
1520 bool isInsertedFlag = false;
1521 HashTableLink *result = d_impl.tryEmplace(
1522 &isInsertedFlag,
1523 NULL,
1524 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
1525 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01));
1526
1527 return ResultType(iterator(result), isInsertedFlag);
1528 }
1529#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
1530
1531#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
1532 template<class LOOKUP_KEY, class Args_01,
1533 class Args_02>
1534 typename bsl::enable_if<
1535 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1536 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1538 const_iterator>::value
1540 iterator>::value,
1541 pair<iterator, bool> >::type
1543 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1544 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02)
1545 {
1546 typedef bsl::pair<iterator, bool> ResultType;
1547 bool isInsertedFlag = false;
1548 HashTableLink *result = d_impl.tryEmplace(
1549 &isInsertedFlag,
1550 NULL,
1551 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
1552 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
1553 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02));
1554
1555 return ResultType(iterator(result), isInsertedFlag);
1556 }
1557#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
1558
1559#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
1560 template<class LOOKUP_KEY, class Args_01,
1561 class Args_02,
1562 class Args_03>
1563 typename bsl::enable_if<
1564 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1565 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1567 const_iterator>::value
1569 iterator>::value,
1570 pair<iterator, bool> >::type
1572 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1573 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1574 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03)
1575 {
1576 typedef bsl::pair<iterator, bool> ResultType;
1577 bool isInsertedFlag = false;
1578 HashTableLink *result = d_impl.tryEmplace(
1579 &isInsertedFlag,
1580 NULL,
1581 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
1582 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
1583 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
1584 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03));
1585
1586 return ResultType(iterator(result), isInsertedFlag);
1587 }
1588#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
1589
1590#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
1591 template<class LOOKUP_KEY, class Args_01,
1592 class Args_02,
1593 class Args_03,
1594 class Args_04>
1595 typename bsl::enable_if<
1596 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1597 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1599 const_iterator>::value
1601 iterator>::value,
1602 pair<iterator, bool> >::type
1604 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1605 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1606 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1607 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04)
1608 {
1609 typedef bsl::pair<iterator, bool> ResultType;
1610 bool isInsertedFlag = false;
1611 HashTableLink *result = d_impl.tryEmplace(
1612 &isInsertedFlag,
1613 NULL,
1614 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
1615 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
1616 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
1617 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
1618 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04));
1619
1620 return ResultType(iterator(result), isInsertedFlag);
1621 }
1622#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
1623
1624#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
1625 template<class LOOKUP_KEY, class Args_01,
1626 class Args_02,
1627 class Args_03,
1628 class Args_04,
1629 class Args_05>
1630 typename bsl::enable_if<
1631 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1632 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1634 const_iterator>::value
1636 iterator>::value,
1637 pair<iterator, bool> >::type
1639 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1640 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1641 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1642 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1643 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05)
1644 {
1645 typedef bsl::pair<iterator, bool> ResultType;
1646 bool isInsertedFlag = false;
1647 HashTableLink *result = d_impl.tryEmplace(
1648 &isInsertedFlag,
1649 NULL,
1650 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
1651 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
1652 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
1653 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
1654 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
1655 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05));
1656
1657 return ResultType(iterator(result), isInsertedFlag);
1658 }
1659#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
1660
1661#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
1662 template<class LOOKUP_KEY, class Args_01,
1663 class Args_02,
1664 class Args_03,
1665 class Args_04,
1666 class Args_05,
1667 class Args_06>
1668 typename bsl::enable_if<
1669 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1670 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1672 const_iterator>::value
1674 iterator>::value,
1675 pair<iterator, bool> >::type
1677 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1678 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1679 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1680 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1681 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1682 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06)
1683 {
1684 typedef bsl::pair<iterator, bool> ResultType;
1685 bool isInsertedFlag = false;
1686 HashTableLink *result = d_impl.tryEmplace(
1687 &isInsertedFlag,
1688 NULL,
1689 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
1690 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
1691 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
1692 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
1693 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
1694 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
1695 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06));
1696
1697 return ResultType(iterator(result), isInsertedFlag);
1698 }
1699#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
1700
1701#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
1702 template<class LOOKUP_KEY, class Args_01,
1703 class Args_02,
1704 class Args_03,
1705 class Args_04,
1706 class Args_05,
1707 class Args_06,
1708 class Args_07>
1709 typename bsl::enable_if<
1710 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1711 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1713 const_iterator>::value
1715 iterator>::value,
1716 pair<iterator, bool> >::type
1718 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1719 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1720 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1721 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1722 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1723 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1724 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07)
1725 {
1726 typedef bsl::pair<iterator, bool> ResultType;
1727 bool isInsertedFlag = false;
1728 HashTableLink *result = d_impl.tryEmplace(
1729 &isInsertedFlag,
1730 NULL,
1731 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
1732 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
1733 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
1734 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
1735 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
1736 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
1737 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
1738 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07));
1739
1740 return ResultType(iterator(result), isInsertedFlag);
1741 }
1742#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
1743
1744#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
1745 template<class LOOKUP_KEY, class Args_01,
1746 class Args_02,
1747 class Args_03,
1748 class Args_04,
1749 class Args_05,
1750 class Args_06,
1751 class Args_07,
1752 class Args_08>
1753 typename bsl::enable_if<
1754 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1755 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1757 const_iterator>::value
1759 iterator>::value,
1760 pair<iterator, bool> >::type
1762 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1763 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1764 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1765 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1766 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1767 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1768 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
1769 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08)
1770 {
1771 typedef bsl::pair<iterator, bool> ResultType;
1772 bool isInsertedFlag = false;
1773 HashTableLink *result = d_impl.tryEmplace(
1774 &isInsertedFlag,
1775 NULL,
1776 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
1777 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
1778 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
1779 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
1780 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
1781 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
1782 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
1783 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
1784 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08));
1785
1786 return ResultType(iterator(result), isInsertedFlag);
1787 }
1788#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
1789
1790#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
1791 template<class LOOKUP_KEY, class Args_01,
1792 class Args_02,
1793 class Args_03,
1794 class Args_04,
1795 class Args_05,
1796 class Args_06,
1797 class Args_07,
1798 class Args_08,
1799 class Args_09>
1800 typename bsl::enable_if<
1801 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1802 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1804 const_iterator>::value
1806 iterator>::value,
1807 pair<iterator, bool> >::type
1809 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1810 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1811 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1812 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1813 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1814 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1815 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
1816 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
1817 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09)
1818 {
1819 typedef bsl::pair<iterator, bool> ResultType;
1820 bool isInsertedFlag = false;
1821 HashTableLink *result = d_impl.tryEmplace(
1822 &isInsertedFlag,
1823 NULL,
1824 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
1825 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
1826 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
1827 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
1828 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
1829 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
1830 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
1831 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
1832 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
1833 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09));
1834
1835 return ResultType(iterator(result), isInsertedFlag);
1836 }
1837#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
1838
1839#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
1840 template<class LOOKUP_KEY, class Args_01,
1841 class Args_02,
1842 class Args_03,
1843 class Args_04,
1844 class Args_05,
1845 class Args_06,
1846 class Args_07,
1847 class Args_08,
1848 class Args_09,
1849 class Args_10>
1850 typename bsl::enable_if<
1851 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
1852 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
1854 const_iterator>::value
1856 iterator>::value,
1857 pair<iterator, bool> >::type
1859 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1860 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1861 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1862 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1863 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1864 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1865 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
1866 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
1867 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
1868 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10)
1869 {
1870 typedef bsl::pair<iterator, bool> ResultType;
1871 bool isInsertedFlag = false;
1872 HashTableLink *result = d_impl.tryEmplace(
1873 &isInsertedFlag,
1874 NULL,
1875 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
1876 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
1877 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
1878 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
1879 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
1880 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
1881 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
1882 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
1883 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
1884 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09),
1885 BSLS_COMPILERFEATURES_FORWARD(Args_10, args_10));
1886
1887 return ResultType(iterator(result), isInsertedFlag);
1888 }
1889#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
1890
1891
1892#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
1893 iterator
1894 try_emplace(const_iterator hint, const KEY& key);
1895#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
1896
1897#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
1898 template<class Args_01>
1899 iterator
1900 try_emplace(const_iterator hint, const KEY& key,
1901 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01);
1902#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
1903
1904#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
1905 template<class Args_01,
1906 class Args_02>
1907 iterator
1908 try_emplace(const_iterator hint, const KEY& key,
1909 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1910 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02);
1911#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
1912
1913#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
1914 template<class Args_01,
1915 class Args_02,
1916 class Args_03>
1917 iterator
1918 try_emplace(const_iterator hint, const KEY& key,
1919 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1920 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1921 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03);
1922#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
1923
1924#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
1925 template<class Args_01,
1926 class Args_02,
1927 class Args_03,
1928 class Args_04>
1929 iterator
1930 try_emplace(const_iterator hint, const KEY& key,
1931 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1932 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1933 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1934 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04);
1935#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
1936
1937#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
1938 template<class Args_01,
1939 class Args_02,
1940 class Args_03,
1941 class Args_04,
1942 class Args_05>
1943 iterator
1944 try_emplace(const_iterator hint, const KEY& key,
1945 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1946 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1947 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1948 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1949 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05);
1950#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
1951
1952#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
1953 template<class Args_01,
1954 class Args_02,
1955 class Args_03,
1956 class Args_04,
1957 class Args_05,
1958 class Args_06>
1959 iterator
1960 try_emplace(const_iterator hint, const KEY& key,
1961 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1962 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1963 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1964 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1965 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1966 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06);
1967#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
1968
1969#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
1970 template<class Args_01,
1971 class Args_02,
1972 class Args_03,
1973 class Args_04,
1974 class Args_05,
1975 class Args_06,
1976 class Args_07>
1977 iterator
1978 try_emplace(const_iterator hint, const KEY& key,
1979 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
1980 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
1981 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
1982 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
1983 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
1984 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
1985 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07);
1986#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
1987
1988#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
1989 template<class Args_01,
1990 class Args_02,
1991 class Args_03,
1992 class Args_04,
1993 class Args_05,
1994 class Args_06,
1995 class Args_07,
1996 class Args_08>
1997 iterator
1998 try_emplace(const_iterator hint, const KEY& key,
1999 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2000 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2001 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2002 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2003 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2004 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2005 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
2006 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08);
2007#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
2008
2009#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
2010 template<class Args_01,
2011 class Args_02,
2012 class Args_03,
2013 class Args_04,
2014 class Args_05,
2015 class Args_06,
2016 class Args_07,
2017 class Args_08,
2018 class Args_09>
2019 iterator
2020 try_emplace(const_iterator hint, const KEY& key,
2021 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2022 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2023 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2024 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2025 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2026 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2027 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
2028 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
2029 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09);
2030#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
2031
2032#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
2033 template<class Args_01,
2034 class Args_02,
2035 class Args_03,
2036 class Args_04,
2037 class Args_05,
2038 class Args_06,
2039 class Args_07,
2040 class Args_08,
2041 class Args_09,
2042 class Args_10>
2043 iterator
2044 try_emplace(const_iterator hint, const KEY& key,
2045 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2046 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2047 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2048 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2049 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2050 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2051 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
2052 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
2053 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
2054 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10);
2055#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
2056
2057
2058#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
2060 BloombergLP::bslmf::MovableRef<KEY> key);
2061#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
2062
2063#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
2064 template <class Args_01>
2066 BloombergLP::bslmf::MovableRef<KEY> key,
2067 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01);
2068#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
2069
2070#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
2071 template <class Args_01,
2072 class Args_02>
2074 BloombergLP::bslmf::MovableRef<KEY> key,
2075 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2076 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02);
2077#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
2078
2079#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
2080 template <class Args_01,
2081 class Args_02,
2082 class Args_03>
2084 BloombergLP::bslmf::MovableRef<KEY> key,
2085 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2086 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2087 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03);
2088#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
2089
2090#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
2091 template <class Args_01,
2092 class Args_02,
2093 class Args_03,
2094 class Args_04>
2096 BloombergLP::bslmf::MovableRef<KEY> key,
2097 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2098 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2099 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2100 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04);
2101#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
2102
2103#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
2104 template <class Args_01,
2105 class Args_02,
2106 class Args_03,
2107 class Args_04,
2108 class Args_05>
2110 BloombergLP::bslmf::MovableRef<KEY> key,
2111 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2112 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2113 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2114 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2115 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05);
2116#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
2117
2118#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
2119 template <class Args_01,
2120 class Args_02,
2121 class Args_03,
2122 class Args_04,
2123 class Args_05,
2124 class Args_06>
2126 BloombergLP::bslmf::MovableRef<KEY> key,
2127 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2128 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2129 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2130 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2131 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2132 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06);
2133#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
2134
2135#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
2136 template <class Args_01,
2137 class Args_02,
2138 class Args_03,
2139 class Args_04,
2140 class Args_05,
2141 class Args_06,
2142 class Args_07>
2144 BloombergLP::bslmf::MovableRef<KEY> key,
2145 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2146 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2147 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2148 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2149 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2150 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2151 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07);
2152#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
2153
2154#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
2155 template <class Args_01,
2156 class Args_02,
2157 class Args_03,
2158 class Args_04,
2159 class Args_05,
2160 class Args_06,
2161 class Args_07,
2162 class Args_08>
2164 BloombergLP::bslmf::MovableRef<KEY> key,
2165 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2166 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2167 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2168 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2169 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2170 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2171 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
2172 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08);
2173#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
2174
2175#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
2176 template <class Args_01,
2177 class Args_02,
2178 class Args_03,
2179 class Args_04,
2180 class Args_05,
2181 class Args_06,
2182 class Args_07,
2183 class Args_08,
2184 class Args_09>
2186 BloombergLP::bslmf::MovableRef<KEY> key,
2187 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2188 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2189 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2190 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2191 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2192 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2193 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
2194 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
2195 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09);
2196#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
2197
2198#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
2199 template <class Args_01,
2200 class Args_02,
2201 class Args_03,
2202 class Args_04,
2203 class Args_05,
2204 class Args_06,
2205 class Args_07,
2206 class Args_08,
2207 class Args_09,
2208 class Args_10>
2210 BloombergLP::bslmf::MovableRef<KEY> key,
2211 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2212 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2213 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2214 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2215 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2216 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2217 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
2218 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
2219 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
2220 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10);
2221#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
2222
2223
2224#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
2225 template<class LOOKUP_KEY>
2226 typename bsl::enable_if<
2227 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2228 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2229 iterator>::type
2231 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key)
2232 {
2233 bool isInsertedFlag = false;
2234 HashTableLink *result = d_impl.tryEmplace(
2235 &isInsertedFlag,
2236 hint.node(),
2237 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key));
2238
2239 return iterator(result);
2240 }
2241#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 0
2242
2243#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
2244 template<class LOOKUP_KEY, class Args_01>
2245 typename bsl::enable_if<
2246 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2247 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2248 iterator>::type
2250 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2251 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01)
2252 {
2253 bool isInsertedFlag = false;
2254 HashTableLink *result = d_impl.tryEmplace(
2255 &isInsertedFlag,
2256 hint.node(),
2257 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2258 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01));
2259
2260 return iterator(result);
2261 }
2262#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 1
2263
2264#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
2265 template<class LOOKUP_KEY, class Args_01,
2266 class Args_02>
2267 typename bsl::enable_if<
2268 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2269 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2270 iterator>::type
2272 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2273 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2274 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02)
2275 {
2276 bool isInsertedFlag = false;
2277 HashTableLink *result = d_impl.tryEmplace(
2278 &isInsertedFlag,
2279 hint.node(),
2280 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2281 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
2282 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02));
2283
2284 return iterator(result);
2285 }
2286#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 2
2287
2288#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
2289 template<class LOOKUP_KEY, class Args_01,
2290 class Args_02,
2291 class Args_03>
2292 typename bsl::enable_if<
2293 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2294 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2295 iterator>::type
2297 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2298 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2299 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2300 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03)
2301 {
2302 bool isInsertedFlag = false;
2303 HashTableLink *result = d_impl.tryEmplace(
2304 &isInsertedFlag,
2305 hint.node(),
2306 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2307 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
2308 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
2309 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03));
2310
2311 return iterator(result);
2312 }
2313#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 3
2314
2315#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
2316 template<class LOOKUP_KEY, class Args_01,
2317 class Args_02,
2318 class Args_03,
2319 class Args_04>
2320 typename bsl::enable_if<
2321 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2322 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2323 iterator>::type
2325 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2326 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2327 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2328 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2329 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04)
2330 {
2331 bool isInsertedFlag = false;
2332 HashTableLink *result = d_impl.tryEmplace(
2333 &isInsertedFlag,
2334 hint.node(),
2335 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2336 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
2337 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
2338 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
2339 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04));
2340
2341 return iterator(result);
2342 }
2343#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 4
2344
2345#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
2346 template<class LOOKUP_KEY, class Args_01,
2347 class Args_02,
2348 class Args_03,
2349 class Args_04,
2350 class Args_05>
2351 typename bsl::enable_if<
2352 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2353 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2354 iterator>::type
2356 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2357 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2358 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2359 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2360 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2361 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05)
2362 {
2363 bool isInsertedFlag = false;
2364 HashTableLink *result = d_impl.tryEmplace(
2365 &isInsertedFlag,
2366 hint.node(),
2367 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2368 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
2369 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
2370 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
2371 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
2372 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05));
2373
2374 return iterator(result);
2375 }
2376#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 5
2377
2378#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
2379 template<class LOOKUP_KEY, class Args_01,
2380 class Args_02,
2381 class Args_03,
2382 class Args_04,
2383 class Args_05,
2384 class Args_06>
2385 typename bsl::enable_if<
2386 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2387 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2388 iterator>::type
2390 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2391 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2392 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2393 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2394 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2395 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2396 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06)
2397 {
2398 bool isInsertedFlag = false;
2399 HashTableLink *result = d_impl.tryEmplace(
2400 &isInsertedFlag,
2401 hint.node(),
2402 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2403 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
2404 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
2405 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
2406 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
2407 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
2408 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06));
2409
2410 return iterator(result);
2411 }
2412#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 6
2413
2414#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
2415 template<class LOOKUP_KEY, class Args_01,
2416 class Args_02,
2417 class Args_03,
2418 class Args_04,
2419 class Args_05,
2420 class Args_06,
2421 class Args_07>
2422 typename bsl::enable_if<
2423 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2424 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2425 iterator>::type
2427 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2428 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2429 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2430 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2431 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2432 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2433 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2434 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07)
2435 {
2436 bool isInsertedFlag = false;
2437 HashTableLink *result = d_impl.tryEmplace(
2438 &isInsertedFlag,
2439 hint.node(),
2440 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2441 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
2442 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
2443 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
2444 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
2445 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
2446 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
2447 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07));
2448
2449 return iterator(result);
2450 }
2451#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 7
2452
2453#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
2454 template<class LOOKUP_KEY, class Args_01,
2455 class Args_02,
2456 class Args_03,
2457 class Args_04,
2458 class Args_05,
2459 class Args_06,
2460 class Args_07,
2461 class Args_08>
2462 typename bsl::enable_if<
2463 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2464 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2465 iterator>::type
2467 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2468 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2469 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2470 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2471 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2472 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2473 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2474 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
2475 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08)
2476 {
2477 bool isInsertedFlag = false;
2478 HashTableLink *result = d_impl.tryEmplace(
2479 &isInsertedFlag,
2480 hint.node(),
2481 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2482 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
2483 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
2484 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
2485 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
2486 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
2487 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
2488 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
2489 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08));
2490
2491 return iterator(result);
2492 }
2493#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 8
2494
2495#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
2496 template<class LOOKUP_KEY, class Args_01,
2497 class Args_02,
2498 class Args_03,
2499 class Args_04,
2500 class Args_05,
2501 class Args_06,
2502 class Args_07,
2503 class Args_08,
2504 class Args_09>
2505 typename bsl::enable_if<
2506 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2507 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2508 iterator>::type
2510 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2511 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2512 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2513 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2514 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2515 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2516 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2517 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
2518 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
2519 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09)
2520 {
2521 bool isInsertedFlag = false;
2522 HashTableLink *result = d_impl.tryEmplace(
2523 &isInsertedFlag,
2524 hint.node(),
2525 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2526 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
2527 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
2528 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
2529 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
2530 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
2531 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
2532 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
2533 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
2534 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09));
2535
2536 return iterator(result);
2537 }
2538#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 9
2539
2540#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
2541 template<class LOOKUP_KEY, class Args_01,
2542 class Args_02,
2543 class Args_03,
2544 class Args_04,
2545 class Args_05,
2546 class Args_06,
2547 class Args_07,
2548 class Args_08,
2549 class Args_09,
2550 class Args_10>
2551 typename bsl::enable_if<
2552 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2553 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2554 iterator>::type
2556 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2557 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
2558 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
2559 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
2560 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
2561 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
2562 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
2563 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
2564 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
2565 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
2566 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10)
2567 {
2568 bool isInsertedFlag = false;
2569 HashTableLink *result = d_impl.tryEmplace(
2570 &isInsertedFlag,
2571 hint.node(),
2572 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2573 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
2574 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
2575 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
2576 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
2577 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
2578 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
2579 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
2580 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
2581 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09),
2582 BSLS_COMPILERFEATURES_FORWARD(Args_10, args_10));
2583
2584 return iterator(result);
2585 }
2586#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_C >= 10
2587
2588#else
2589// The generated code below is a workaround for the absence of perfect
2590// forwarding in some compilers.
2591 template <class... Args>
2592 pair<iterator, bool> try_emplace(const KEY& key,
2593 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... args);
2594
2595 template <class... Args>
2596 pair<iterator, bool> try_emplace(
2597 BloombergLP::bslmf::MovableRef<KEY> key,
2598 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... args);
2599
2600 template<class LOOKUP_KEY, class... Args>
2601 typename bsl::enable_if<
2602 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2603 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
2605 const_iterator>::value
2607 iterator>::value,
2608 pair<iterator, bool> >::type
2611 {
2612 typedef bsl::pair<iterator, bool> ResultType;
2613 bool isInsertedFlag = false;
2614 HashTableLink *result = d_impl.tryEmplace(
2615 &isInsertedFlag,
2616 NULL,
2617 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2618 BSLS_COMPILERFEATURES_FORWARD(Args, args)...);
2619
2620 return ResultType(iterator(result), isInsertedFlag);
2621 }
2622
2623 template<class... Args>
2624 iterator
2625 try_emplace(const_iterator hint, const KEY& key,
2626 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... args);
2627
2628 template <class... Args>
2630 BloombergLP::bslmf::MovableRef<KEY> key,
2631 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... args);
2632
2633 template<class LOOKUP_KEY, class... Args>
2634 typename bsl::enable_if<
2635 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2636 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2637 iterator>::type
2639 BSLS_COMPILERFEATURES_FORWARD_REF(LOOKUP_KEY) key,
2641 {
2642 bool isInsertedFlag = false;
2643 HashTableLink *result = d_impl.tryEmplace(
2644 &isInsertedFlag,
2645 hint.node(),
2646 BSLS_COMPILERFEATURES_FORWARD(LOOKUP_KEY, key),
2647 BSLS_COMPILERFEATURES_FORWARD(Args, args)...);
2648
2649 return iterator(result);
2650 }
2651// }}} END GENERATED CODE
2652#endif
2653
2654 // ACCESSORS
2655
2656 /// Return a reference providing non-modifiable access to the
2657 /// mapped-value associated with the specified `key`, if such an entry
2658 /// exists; otherwise throw a `std::out_of_range` exception. Note that
2659 /// this method is not exception-neutral.
2661 const;
2662
2664
2665 /// Return an iterator providing non-modifiable access to the first
2666 /// `value_type` object in the sequence of `value_type` objects
2667 /// maintained by this unordered map, or the `end` iterator if this
2668 /// unordered map is empty.
2670
2672
2673 /// Return an iterator providing non-modifiable access to the
2674 /// past-the-end position in the sequence of `value_type` objects
2675 /// maintained by this unordered map.
2677
2679
2680 /// Return a local iterator providing non-modifiable access to the first
2681 /// `value_type` object in the sequence of `value_type` objects of the
2682 /// bucket having the specified `index` in the array of buckets
2683 /// maintained by this unordered map, or the `end(index)` iterator if
2684 /// the bucket is empty. The behavior is undefined unless
2685 /// `index < bucket_count()`.
2687
2688 const_local_iterator end(size_type index) const;
2689
2690 /// Return a local iterator providing non-modifiable access to the
2691 /// past-the-end position in the sequence of `value_type` objects of the
2692 /// bucket having the specified `index` in the array of buckets
2693 /// maintained by this unordered map. The behavior is undefined unless
2694 /// `index < bucket_count()`.
2695 const_local_iterator cend(size_type index) const;
2696
2697 /// Return the index of the bucket, in the array of buckets maintained
2698 /// by this unordered map, where values having a key equivalent to the
2699 /// specified `key` would be inserted.
2700 size_type bucket(const key_type& key) const;
2701
2702 /// Return the number of buckets in the array of buckets maintained by
2703 /// this unordered map.
2705
2706 /// Return a theoretical upper bound on the largest number of buckets
2707 /// that this unordered map could possibly manage. Note that there is
2708 /// no guarantee that the unordered map can successfully grow to the
2709 /// returned size, or even close to that size, without running out of
2710 /// resources.
2712
2713 /// Return the number of elements contained in the bucket at the
2714 /// specified `index` in the array of buckets maintained by this
2715 /// unordered map. The behavior is undefined unless
2716 /// `index < bucket_count()`.
2717 size_type bucket_size(size_type index) const;
2718
2719 /// Return the number of `value_type` objects within this unordered map
2720 /// that have a key equivalent to the specified `key`. The behavior is
2721 /// undefined unless `key` is equivalent to at most one key in this
2722 /// unordered map. Note that since an unordered map maintains unique
2723 /// keys, the returned value will be either 0 or 1.
2724 ///
2725 /// Note: implemented inline due to Sun CC compilation error.
2726 template <class LOOKUP_KEY>
2727 typename enable_if<
2728 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2729 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2730 size_type>::type
2731 count(const LOOKUP_KEY& key) const
2732 {
2733 return d_impl.find(key) != 0;
2734 }
2735
2736 /// Return the number of `value_type` objects contained within this
2737 /// unordered map having the specified `key`. Note that since an
2738 /// unordered map maintains unique keys, the returned value will be
2739 /// either 0 or 1.
2740 size_type count(const key_type& key) const;
2741
2742 /// Return `true` if this unordered map contains an element whose key is
2743 /// equivalent to the specified `key`.
2744 bool contains(const key_type &key) const;
2745
2746 /// Return `true` if this unordered map contains an element whose key is
2747 /// equivalent to the specified `key`.
2748 ///
2749 /// Note: implemented inline due to Sun CC compilation error
2750 template <class LOOKUP_KEY>
2751 typename enable_if<
2752 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value &&
2753 BloombergLP::bslmf::IsTransparentPredicate<EQUAL,
2754 LOOKUP_KEY>::value,
2755 bool>::type
2756 contains(const LOOKUP_KEY& key) const
2757 {
2758 return find(key) != end();
2759 }
2760
2761 /// Return `true` if this unordered map contains no elements, and
2762 /// `false` otherwise.
2763 bool empty() const BSLS_KEYWORD_NOEXCEPT;
2764
2765 /// Return a pair of iterators providing non-modifiable access to the
2766 /// sequence of `value_type` objects in this unordered map with a key
2767 /// equivalent to specified `key`, where the first iterator is
2768 /// positioned at the start of the sequence, and the second is
2769 /// positioned one past the end of the sequence. If this unordered map
2770 /// contains no `value_type` objects having a key equivalent to `key`,
2771 /// then the two returned iterators will have the same value, `end()`.
2772 /// The behavior is undefined unless `key` is equivalent to at most one
2773 /// key in this unordered map. Note that since an unordered map
2774 /// maintains unique keys, the range will contain at most one element.
2775 ///
2776 /// Note: implemented inline due to Sun CC compilation error.
2777 template <class LOOKUP_KEY>
2778 typename enable_if<
2779 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2780 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2781 pair<const_iterator, const_iterator> >::type
2782 equal_range(const LOOKUP_KEY& key) const
2783 {
2785
2786 HashTableLink *first = d_impl.find(key);
2787 return first
2788 ? ResultType(iterator(first), iterator(first->nextLink()))
2789 : ResultType(iterator(0), iterator(0));
2790 }
2791
2792 /// Return a pair of iterators providing non-modifiable access to the
2793 /// sequence of `value_type` objects in this unordered map having the
2794 /// specified `key`, where the first iterator is positioned at the start
2795 /// of the sequence, and the second is positioned one past the end of
2796 /// the sequence. If this unordered map contains no `value_type` object
2797 /// having `key`, then the two returned iterators will have the same
2798 /// value, `end()`. Note that since an unordered map maintains unique
2799 /// keys, the range will contain at most one element.
2800 pair<const_iterator, const_iterator> equal_range(
2801 const key_type& key) const;
2802
2803 /// Return an iterator providing non-modifiable access to the
2804 /// `value_type` object in this unordered map with a key equivalent to
2805 /// the specified `key`, if such an entry exists, and the past-the-end
2806 /// iterator (`end`) otherwise. The behavior is undefined unless `key`
2807 /// is equivalent to at most one key in this unordered map.
2808 ///
2809 /// Note: implemented inline due to Sun CC compilation error.
2810 template <class LOOKUP_KEY>
2811 typename enable_if<
2812 BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
2813 && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value,
2814 const_iterator>::type
2815 find(const LOOKUP_KEY& key) const
2816 {
2817 return const_iterator(d_impl.find(key));
2818 }
2819
2820 /// Return an iterator providing non-modifiable access to the
2821 /// `value_type` object in this unordered map with a key equivalent to
2822 /// the specified `key`, if such an entry exists, and the past-the-end
2823 /// iterator (`end`) otherwise.
2824 const_iterator find(const key_type& key) const;
2825
2826 /// Return (a copy of) the allocator used for memory allocation by this
2827 /// unordered map.
2829
2830 /// Return (a copy of) the unary hash functor used by this unordered map
2831 /// to generate a hash value (of type `size_type`) for a `key_type`
2832 /// object.
2833 HASH hash_function() const;
2834
2835 /// Return (a copy of) binary the key-equality functor used by this
2836 /// unordered map that returns `true` if two `key_type` objects are
2837 /// equivalent, and `false` otherwise.
2838 EQUAL key_eq() const;
2839
2840 /// Return the current ratio between the `size` of this unordered map
2841 /// and the number of buckets. The load factor is a measure of how
2842 /// full the container is, and a higher load factor typically leads to
2843 /// an increased number of collisions, thus resulting in a loss of
2844 /// performance.
2845 float load_factor() const BSLS_KEYWORD_NOEXCEPT;
2846
2847 /// Return the maximum load factor allowed for this unordered map. Note
2848 /// that if an insert operation would cause the load factor to exceed
2849 /// the `max_load_factor`, that same insert operation will increase the
2850 /// number of buckets and rehash the elements of the container into
2851 /// those buckets (see `rehash`).
2853
2854 /// Return the number of elements in this unordered map.
2856
2857 /// Return a theoretical upper bound on the largest number of elements
2858 /// that this unordered map could possibly hold. Note that there is no
2859 /// guarantee that the unordered map can successfully grow to the
2860 /// returned size, or even close to that size, without running out of
2861 /// resources.
2863};
2864
2865#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
2866// CLASS TEMPLATE DEDUCTION GUIDES
2867
2868/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
2869/// of the iterators supplied to the constructor of `unordered_map`. Deduce
2870/// the template parameters `HASH`, `EQUAL` and `ALLOCATOR` from the other
2871/// parameters passed to the constructor of `unordered_map`. This deduction
2872/// guide does not participate unless: (1) the supplied `HASH` is invokable
2873/// with a `KEY`, (2) the supplied `EQUAL` is invokable with two `KEY`s, and
2874/// (3) the supplied allocator meets the requirements of a standard
2875/// allocator.
2876template <
2877 class INPUT_ITERATOR,
2878 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2879 class VALUE =
2880 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2881 class HASH = bsl::hash<KEY>,
2882 class EQUAL = bsl::equal_to<KEY>,
2883 class ALLOCATOR = bsl::allocator<pair<const KEY, VALUE>>,
2884 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
2885 class = bsl::enable_if_t<
2886 std::is_invocable_v<EQUAL, const KEY &, const KEY &>>,
2887 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2888 >
2889unordered_map(INPUT_ITERATOR,
2890 INPUT_ITERATOR,
2891 typename bsl::allocator_traits<ALLOCATOR>::size_type = 0,
2892 HASH = HASH(),
2893 EQUAL = EQUAL(),
2894 ALLOCATOR = ALLOCATOR())
2895-> unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>;
2896
2897/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
2898/// of the iterators supplied to the constructor of `unordered_map`. Deduce
2899/// the template parameters `HASH` and "EQUAL' from the other parameters
2900/// passed to the constructor of `unordered_map`. This deduction guide does
2901/// not participate unless the supplied allocator is convertible to
2902/// `bsl::allocator<bsl::pair<const KEY, VALUE>>`.
2903template <
2904 class INPUT_ITERATOR,
2905 class HASH,
2906 class EQUAL,
2907 class ALLOC,
2908 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2909 class VALUE =
2910 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2911 class DEFAULT_ALLOCATOR = bsl::allocator<pair<const KEY, VALUE>>,
2912 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2913 >
2914unordered_map(INPUT_ITERATOR,
2915 INPUT_ITERATOR,
2916 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
2917 HASH,
2918 EQUAL,
2919 ALLOC *)
2920-> unordered_map<KEY, VALUE, HASH, EQUAL>;
2921
2922/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
2923/// of the iterators supplied to the constructor of `unordered_map`. Deduce
2924/// the template parameters `HASH` and `ALLOCATOR` from the other
2925/// parameters passed to the constructor of `unordered_map`. This deduction
2926/// guide does not participate unless the supplied hash is invokable with a
2927/// `KEY` and the supplied allocator meets the requirements of a standard
2928/// allocator.
2929template <
2930 class INPUT_ITERATOR,
2931 class HASH,
2932 class ALLOCATOR,
2933 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2934 class VALUE =
2935 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2936 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
2937 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2938 >
2939unordered_map(INPUT_ITERATOR,
2940 INPUT_ITERATOR,
2941 typename bsl::allocator_traits<ALLOCATOR>::size_type,
2942 HASH,
2943 ALLOCATOR)
2944-> unordered_map<KEY, VALUE, HASH, bsl::equal_to<KEY>, ALLOCATOR>;
2945
2946/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
2947/// of the iterators supplied to the constructor of `unordered_map`. Deduce
2948/// the template parameter `HASH` from the other parameters passed to the
2949/// constructor of `unordered_map`. This deduction guide does not
2950/// participate unless the supplied allocator is convertible to
2951/// `bsl::allocator<bsl::pair<const KEY, VALUE>>`.
2952template <
2953 class INPUT_ITERATOR,
2954 class HASH,
2955 class ALLOC,
2956 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2957 class VALUE =
2958 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2959 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
2960 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
2961 >
2962unordered_map(INPUT_ITERATOR,
2963 INPUT_ITERATOR,
2964 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
2965 HASH,
2966 ALLOC *)
2967-> unordered_map<KEY, VALUE, HASH>;
2968
2969/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
2970/// of the iterators supplied to the constructor of `unordered_map`. Deduce
2971/// the template parameter `ALLOCATOR` from the other parameter passed to
2972/// the constructor of `unordered_map`. This deduction guide does not
2973/// participate unless the supplied allocator meets the requirements of a
2974/// standard allocator.
2975template <
2976 class INPUT_ITERATOR,
2977 class ALLOCATOR,
2978 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2979 class VALUE =
2980 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2981 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
2982 >
2983unordered_map(INPUT_ITERATOR,
2984 INPUT_ITERATOR,
2985 typename bsl::allocator_traits<ALLOCATOR>::size_type,
2986 ALLOCATOR)
2987-> unordered_map<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
2988
2989/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
2990/// of the iterators supplied to the constructor of `unordered_map`. This
2991/// deduction guide does not participate unless the supplied allocator is
2992/// convertible to `bsl::allocator<bsl::pair<const KEY, VALUE>>`.
2993template <
2994 class INPUT_ITERATOR,
2995 class ALLOC,
2996 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
2997 class VALUE =
2998 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
2999 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
3000 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
3001 >
3002unordered_map(INPUT_ITERATOR,
3003 INPUT_ITERATOR,
3004 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
3005 ALLOC *)
3006-> unordered_map<KEY, VALUE>;
3007
3008/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
3009/// of the iterators supplied to the constructor of `unordered_map`. Deduce
3010/// the template parameter `ALLOCATOR` from the other parameter passed to
3011/// the constructor of `unordered_map`. This deduction guide does not
3012/// participate unless the supplied allocator meets the requirements of a
3013/// standard allocator.
3014template <
3015 class INPUT_ITERATOR,
3016 class ALLOCATOR,
3017 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
3018 class VALUE =
3019 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
3020 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
3021 >
3022unordered_map(INPUT_ITERATOR, INPUT_ITERATOR, ALLOCATOR)
3023-> unordered_map<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
3024
3025/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
3026/// of the iterators supplied to the constructor of `unordered_map`. This
3027/// deduction guide does not participate unless the supplied allocator is
3028/// convertible to `bsl::allocator<bsl::pair<const KEY, VALUE>>`.
3029template <
3030 class INPUT_ITERATOR,
3031 class ALLOC,
3032 class KEY = BloombergLP::bslstl::IteratorUtil::IterKey_t<INPUT_ITERATOR>,
3033 class VALUE =
3034 BloombergLP::bslstl::IteratorUtil::IterMapped_t<INPUT_ITERATOR>,
3035 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
3036 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
3037 >
3038unordered_map(INPUT_ITERATOR, INPUT_ITERATOR, ALLOC *)
3039-> unordered_map<KEY, VALUE>;
3040
3041/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
3042/// of the initializer_list supplied to the constructor of `unordered_map`.
3043/// Deduce the template parameters `HASH`, `EQUAL` and `ALLOCATOR` from the
3044/// other parameters supplied to the constructor of `unordered_map`. This
3045/// deduction guide does not participate unless: (1) the supplied `HASH` is
3046/// invokable with a `KEY`, (2) the supplied `EQUAL` is invokable with two
3047/// `KEY`s, and (3) the supplied allocator meets the requirements of a
3048/// standard allocator.
3049template <
3050 class KEY,
3051 class VALUE,
3052 class HASH = bsl::hash<KEY>,
3053 class EQUAL = bsl::equal_to<KEY>,
3054 class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
3055 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
3056 class = bsl::enable_if_t<
3057 std::is_invocable_v<EQUAL, const KEY &, const KEY &>>,
3058 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
3059 >
3060unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
3061 typename bsl::allocator_traits<ALLOCATOR>::size_type = 0,
3062 HASH = HASH(),
3063 EQUAL = EQUAL(),
3064 ALLOCATOR = ALLOCATOR())
3065-> unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>;
3066
3067/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
3068/// of the initializer_list supplied to the constructor of `unordered_map`.
3069/// Deduce the template parameters `HASH` and `EQUAL` from the other
3070/// parameters supplied to the constructor of `unordered_map`. This
3071/// deduction guide does not participate unless the supplied allocator is
3072/// convertible to `bsl::allocator<bsl::pair<const KEY, VALUE>>`.
3073template <
3074 class KEY,
3075 class VALUE,
3076 class HASH,
3077 class EQUAL,
3078 class ALLOC,
3079 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
3080 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
3081 >
3082unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
3083 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
3084 HASH,
3085 EQUAL,
3086 ALLOC *)
3087-> unordered_map<KEY, VALUE, HASH, EQUAL>;
3088
3089/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
3090/// of the initializer_list supplied to the constructor of `unordered_map`.
3091/// Deduce the template parameters `HASH` and `ALLOCATOR` from the other
3092/// parameters supplied to the constructor of `unordered_map`. This
3093/// deduction guide does not participate unless the supplied `HASH` is
3094/// invokable with a `KEY`, and the supplied allocator meets the
3095/// requirements of a standard allocator.
3096template <
3097 class KEY,
3098 class VALUE,
3099 class HASH,
3100 class ALLOCATOR,
3101 class = bsl::enable_if_t<std::is_invocable_v<HASH, const KEY &>>,
3102 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
3103 >
3104unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
3105 typename bsl::allocator_traits<ALLOCATOR>::size_type,
3106 HASH,
3107 ALLOCATOR)
3108-> unordered_map<KEY, VALUE, HASH, bsl::equal_to<KEY>, ALLOCATOR>;
3109
3110/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
3111/// of the initializer_list supplied to the constructor of `unordered_map`.
3112/// Deduce the template parameter `HASH` from the other parameters supplied
3113/// to the constructor of `unordered_map`. This deduction guide does not
3114/// participate unless the supplied allocator is convertible to
3115/// `bsl::allocator<bsl::pair<const KEY, VALUE>>`.
3116template <
3117 class KEY,
3118 class VALUE,
3119 class HASH,
3120 class ALLOC,
3121 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
3122 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
3123 >
3124unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
3125 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
3126 HASH,
3127 ALLOC *)
3128-> unordered_map<KEY, VALUE, HASH>;
3129
3130/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
3131/// of the initializer_list supplied to the constructor of `unordered_map`.
3132/// This deduction guide does not participate unless the supplied allocator
3133/// meets the requirements of a standard allocator.
3134template <
3135 class KEY,
3136 class VALUE,
3137 class ALLOCATOR,
3138 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
3139 >
3140unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
3141 typename bsl::allocator_traits<ALLOCATOR>::size_type,
3142 ALLOCATOR)
3143-> unordered_map<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
3144
3145/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
3146/// of the initializer_list supplied to the constructor of `unordered_map`.
3147/// This deduction guide does not participate unless the supplied allocator
3148/// is convertible to `bsl::allocator<bsl::pair<const KEY, VALUE>>`.
3149template <
3150 class KEY,
3151 class VALUE,
3152 class ALLOC,
3153 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
3154 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
3155 >
3156unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>,
3157 typename bsl::allocator_traits<DEFAULT_ALLOCATOR>::size_type,
3158 ALLOC *)
3159-> unordered_map<KEY, VALUE>;
3160
3161/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
3162/// of the initializer_list supplied to the constructor of `unordered_map`.
3163/// Deduce the template parameter `ALLOCATOR` from the other parameters
3164/// supplied to the constructor of `unordered_map`. This deduction guide
3165/// does not participate unless the supplied allocator meets the
3166/// requirements of a standard allocator.
3167template <
3168 class KEY,
3169 class VALUE,
3170 class ALLOCATOR,
3171 class = bsl::enable_if_t<bsl::IsStdAllocator_v<ALLOCATOR>>
3172 >
3173unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>, ALLOCATOR)
3174-> unordered_map<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>;
3175
3176/// Deduce the template parameters `KEY` and `VALUE` from the `value_type`
3177/// of the initializer_list supplied to the constructor of `unordered_map`.
3178/// This deduction guide does not participate unless the supplied allocator
3179/// is convertible to `bsl::allocator<bsl::pair<const KEY, VALUE>>`.
3180template <
3181 class KEY,
3182 class VALUE,
3183 class ALLOC,
3184 class DEFAULT_ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE>>,
3185 class = bsl::enable_if_t<bsl::is_convertible_v<ALLOC *, DEFAULT_ALLOCATOR>>
3186 >
3187unordered_map(std::initializer_list<bsl::pair<const KEY, VALUE>>, ALLOC *)
3188-> unordered_map<KEY, VALUE>;
3189#endif
3190
3191// FREE OPERATORS
3192
3193/// Return `true` if the specified `lhs` and `rhs` objects have the same
3194/// value, and `false` otherwise. Two `unordered_map` objects have the
3195/// same value if they have the same number of key-value pairs, and for each
3196/// key-value pair that is contained in `lhs` there is a key-value pair
3197/// contained in `rhs` having the same value, and vice versa. Note that
3198/// this method requires that the (template parameter) types `KEY` and
3199/// `VALUE` both be `equality-comparable` (see {Requirements on
3200/// `value_type`}).
3201template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3202bool operator==(const unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& lhs,
3203 const unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& rhs);
3204
3205#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
3206template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3207bool operator!=(const unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& lhs,
3208 const unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& rhs);
3209 // Return 'true' if the specified 'lhs' and 'rhs' objects do not have the
3210 // same value, and 'false' otherwise. Two 'unordered_map' objects do not
3211 // have the same value if they do not have the same number of key-value
3212 // pairs, or for some key-value pair that is contained in 'lhs' there is
3213 // not a key-value pair in 'rhs' having the same value or vice-versa. Note
3214 // that this method requires that the (template parameter) types 'KEY' and
3215 // 'VALUE' both be 'equality-comparable' (see {Requirements on
3216 // 'value_type'}).
3217#endif
3218
3219// FREE FUNCTIONS
3220
3221/// Erase all the elements in the specified unordered_map `m` that satisfy
3222/// the specified predicate `predicate`. Return the number of elements
3223/// erased.
3224template <class KEY,
3225 class VALUE,
3226 class HASH,
3227 class EQUAL,
3228 class ALLOCATOR,
3229 class PREDICATE>
3230typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
3231erase_if(unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& m,
3232 PREDICATE predicate);
3233
3234/// Exchange the value, hasher, key-equality functor, and `max_load_factor`
3235/// of the specified `a` object with those of the specified `b` object; also
3236/// exchange the allocator of `a` with that of `b` if the (template
3237/// parameter) type `ALLOCATOR` has the `propagate_on_container_swap` trait,
3238/// and do not modify either allocator otherwise. This function provides
3239/// the no-throw exception-safety guarantee if and only if both the
3240/// (template parameter) types `HASH` and `EQUAL` provide no-throw swap
3241/// operations; if an exception is thrown, both objects are left in valid
3242/// but unspecified states. This operation guarantees `O[1]` complexity.
3243/// The behavior is undefined unless either `a` was created with the same
3244/// allocator as `b` or `ALLOCATOR` has the `propagate_on_container_swap`
3245/// trait.
3246template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3247void swap(unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& a,
3248 unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& b)
3250
3251} // close namespace bsl
3252
3253// ============================================================================
3254// TEMPLATE AND INLINE FUNCTION DEFINITIONS
3255// ============================================================================
3256
3257namespace bsl {
3258 //--------------------
3259 // class unordered_map
3260 //--------------------
3261
3262// CREATORS
3263template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3264inline
3265unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::
3266unordered_map(size_type initialNumBuckets,
3267 const HASH& hashFunction,
3268 const EQUAL& keyEqual,
3269 const ALLOCATOR& basicAllocator)
3270: d_impl(hashFunction, keyEqual, initialNumBuckets, 1.0f, basicAllocator)
3271{
3272}
3273
3274template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3275inline
3276unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3277 size_type initialNumBuckets,
3278 const HASH& hashFunction,
3279 const ALLOCATOR& basicAllocator)
3280: d_impl(hashFunction, EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
3281{
3282}
3283
3284template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3285inline
3286unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3287 size_type initialNumBuckets,
3288 const ALLOCATOR& basicAllocator)
3289: d_impl(HASH(), EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
3290{
3291}
3292
3293template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3294inline
3295unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3296 const ALLOCATOR& basicAllocator)
3297: d_impl(basicAllocator)
3298{
3299}
3300
3301template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3302inline
3303unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map()
3304: d_impl()
3305{
3306}
3307
3308template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3309template <class INPUT_ITERATOR>
3310inline
3311unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3312 INPUT_ITERATOR first,
3313 INPUT_ITERATOR last,
3314 size_type initialNumBuckets,
3315 const HASH& hashFunction,
3316 const EQUAL& keyEqual,
3317 const ALLOCATOR& basicAllocator)
3318: d_impl(hashFunction, keyEqual, initialNumBuckets, 1.0f, basicAllocator)
3319{
3320 this->insert(first, last);
3321}
3322
3323template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3324template <class INPUT_ITERATOR>
3325inline
3326unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3327 INPUT_ITERATOR first,
3328 INPUT_ITERATOR last,
3329 size_type initialNumBuckets,
3330 const HASH& hashFunction,
3331 const ALLOCATOR& basicAllocator)
3332: d_impl(hashFunction, EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
3333{
3334 this->insert(first, last);
3335}
3336
3337template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3338template <class INPUT_ITERATOR>
3339inline
3340unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3341 INPUT_ITERATOR first,
3342 INPUT_ITERATOR last,
3343 size_type initialNumBuckets,
3344 const ALLOCATOR& basicAllocator)
3345: d_impl(HASH(), EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
3346{
3347 this->insert(first, last);
3348}
3349
3350template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3351template <class INPUT_ITERATOR>
3352inline
3353unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3354 INPUT_ITERATOR first,
3355 INPUT_ITERATOR last,
3356 const ALLOCATOR& basicAllocator)
3357: d_impl(basicAllocator)
3358{
3359 this->insert(first, last);
3360}
3361
3362#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
3363template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3364# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
3365template <class, class, class>
3366# endif
3367inline
3368unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3369 std::initializer_list<value_type> values,
3370 size_type initialNumBuckets,
3371 const HASH& hashFunction,
3372 const EQUAL& keyEqual,
3373 const ALLOCATOR& basicAllocator)
3374: d_impl(hashFunction, keyEqual, initialNumBuckets, 1.0f, basicAllocator)
3375{
3376 insert(values.begin(), values.end());
3377}
3378
3379template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3380# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
3381template <class, class>
3382# endif
3383inline
3384unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3385 std::initializer_list<value_type> values,
3386 size_type initialNumBuckets,
3387 const HASH& hashFunction,
3388 const ALLOCATOR& basicAllocator)
3389: d_impl(hashFunction, EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
3390{
3391 insert(values.begin(), values.end());
3392}
3393
3394template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3395# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
3396template <class>
3397# endif
3398inline
3399unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3400 std::initializer_list<value_type> values,
3401 size_type initialNumBuckets,
3402 const ALLOCATOR& basicAllocator)
3403: d_impl(HASH(), EQUAL(), initialNumBuckets, 1.0f, basicAllocator)
3404{
3405 insert(values.begin(), values.end());
3406}
3407
3408template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3409# ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
3410template <class>
3411# endif
3412inline
3413unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3414 std::initializer_list<value_type> values,
3415 const ALLOCATOR& basicAllocator)
3416: d_impl(basicAllocator)
3417{
3418 insert(values.begin(), values.end());
3419}
3420#endif
3421
3422template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3423inline
3424unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3425 const unordered_map& original)
3426: d_impl(original.d_impl,
3427 AllocatorTraits::select_on_container_copy_construction(
3428 original.get_allocator()))
3429{
3430}
3431
3432template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3433inline
3434unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3435 const unordered_map& original,
3436 const typename type_identity<ALLOCATOR>::type& basicAllocator)
3437: d_impl(original.d_impl, basicAllocator)
3438{
3439}
3440
3441template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3442inline
3443unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3444 BloombergLP::bslmf::MovableRef<unordered_map> original)
3445: d_impl(MoveUtil::access(original).get_allocator())
3446{
3447 unordered_map& lvalue = original;
3448
3449 this->swap(lvalue);
3450}
3451
3452template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3453inline
3454unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::unordered_map(
3455 BloombergLP::bslmf::MovableRef<unordered_map> original,
3456 const typename type_identity<ALLOCATOR>::type& basicAllocator)
3457: d_impl(MoveUtil::move(MoveUtil::access(original).d_impl), basicAllocator)
3458{
3459}
3460
3461template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3462inline
3463unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::~unordered_map()
3464{
3465 // All memory management is handled by the base 'd_impl' member.
3466}
3467
3468// MANIPULATORS
3469template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3470inline
3471unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>&
3472unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::operator=(
3473 const unordered_map& rhs)
3474{
3475 // Note that we have delegated responsibility for correct handling of
3476 // allocator propagation to the 'HashTable' implementation.
3477
3478 d_impl = rhs.d_impl;
3479
3480 return *this;
3481}
3482
3483template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3484inline
3485unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>&
3486unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::operator=(
3487 BloombergLP::bslmf::MovableRef<unordered_map> rhs)
3489 AllocatorTraits::is_always_equal::value &&
3490 std::is_nothrow_move_assignable<HASH>::value &&
3491 std::is_nothrow_move_assignable<EQUAL>::value)
3492{
3493 // Note that we have delegated responsibility for correct handling of
3494 // allocator propagation to the 'HashTable' implementation.
3495
3496 unordered_map& lvalue = rhs;
3497
3498 d_impl = MoveUtil::move(lvalue.d_impl);
3499
3500 return *this;
3501}
3502
3503#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
3504template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3505inline
3506unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>&
3507unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::operator=(
3508 std::initializer_list<value_type> rhs)
3509{
3510 unordered_map tmp(rhs.begin(), rhs.end(), d_impl.allocator());
3511
3512 this->swap(tmp);
3513
3514 return *this;
3515}
3516#endif
3517
3518template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3519inline
3520typename add_lvalue_reference<VALUE>::type
3521unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::operator[](
3522 const key_type& key)
3523{
3524 HashTableLink *node = d_impl.insertIfMissing(key);
3525 return static_cast<HashTableNode *>(node)->value().second;
3526}
3527
3528template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3529inline
3530typename add_lvalue_reference<VALUE>::type
3531unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::operator[](
3532 BloombergLP::bslmf::MovableRef<key_type> key)
3533{
3534 HashTableLink *node = d_impl.insertIfMissing(
3535 MoveUtil::move(MoveUtil::access(key)));
3536 return static_cast<HashTableNode *>(node)->value().second;
3537}
3538
3539template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3540inline
3541typename add_lvalue_reference<VALUE>::type
3542unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::at(const key_type& key)
3543{
3544 HashTableLink *node = d_impl.find(key);
3545
3546 if (!node) {
3547 BloombergLP::bslstl::StdExceptUtil::throwOutOfRange(
3548 "unordered_map<...>::at(key_type): invalid key value");
3549 }
3550
3551 return static_cast<HashTableNode *>(node)->value().second;
3552}
3553
3554template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3555inline
3556typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
3557unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::begin()
3559{
3560 return iterator(d_impl.elementListRoot());
3561}
3562
3563template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3564inline
3565typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
3566unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::end() BSLS_KEYWORD_NOEXCEPT
3567{
3568 return iterator();
3569}
3570
3571template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3572inline
3573typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::local_iterator
3574unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::begin(size_type index)
3575{
3576 BSLS_ASSERT_SAFE(index < this->bucket_count());
3577
3578 return local_iterator(&d_impl.bucketAtIndex(index));
3579}
3580
3581template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3582inline
3583typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::local_iterator
3584unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::end(size_type index)
3585{
3586 BSLS_ASSERT_SAFE(index < this->bucket_count());
3587
3588 return local_iterator(0, &d_impl.bucketAtIndex(index));
3589}
3590
3591template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3592inline
3593void
3594unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::clear()
3596{
3597 d_impl.removeAll();
3598}
3599
3600#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
3601// {{{ BEGIN GENERATED CODE
3602// Command line: sim_cpp11_features.pl bslstl_unorderedmap.h
3603#ifndef BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT
3604#define BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT 10
3605#endif
3606#ifndef BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D
3607#define BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT
3608#endif
3609#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 0
3610template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3611bsl::pair<
3612 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3613 bool>
3614unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3615 )
3616{
3617 typedef bsl::pair<iterator, bool> ResultType;
3618
3619 bool isInsertedFlag = false;
3620
3621 HashTableLink *result = d_impl.emplaceIfMissing(
3622 &isInsertedFlag);
3623
3624 return ResultType(iterator(result), isInsertedFlag);
3625}
3626#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 0
3627
3628#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 1
3629template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3630template <class Args_01>
3631bsl::pair<
3632 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3633 bool>
3634unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3635 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01)
3636{
3637 typedef bsl::pair<iterator, bool> ResultType;
3638
3639 bool isInsertedFlag = false;
3640
3641 HashTableLink *result = d_impl.emplaceIfMissing(
3642 &isInsertedFlag,
3643 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01));
3644
3645 return ResultType(iterator(result), isInsertedFlag);
3646}
3647#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 1
3648
3649#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 2
3650template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3651template <class Args_01,
3652 class Args_02>
3653bsl::pair<
3654 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3655 bool>
3656unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3657 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
3658 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02)
3659{
3660 typedef bsl::pair<iterator, bool> ResultType;
3661
3662 bool isInsertedFlag = false;
3663
3664 HashTableLink *result = d_impl.emplaceIfMissing(
3665 &isInsertedFlag,
3666 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
3667 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02));
3668
3669 return ResultType(iterator(result), isInsertedFlag);
3670}
3671#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 2
3672
3673#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 3
3674template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3675template <class Args_01,
3676 class Args_02,
3677 class Args_03>
3678bsl::pair<
3679 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3680 bool>
3681unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3682 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
3683 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
3684 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03)
3685{
3686 typedef bsl::pair<iterator, bool> ResultType;
3687
3688 bool isInsertedFlag = false;
3689
3690 HashTableLink *result = d_impl.emplaceIfMissing(
3691 &isInsertedFlag,
3692 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
3693 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
3694 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03));
3695
3696 return ResultType(iterator(result), isInsertedFlag);
3697}
3698#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 3
3699
3700#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 4
3701template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3702template <class Args_01,
3703 class Args_02,
3704 class Args_03,
3705 class Args_04>
3706bsl::pair<
3707 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3708 bool>
3709unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3710 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
3711 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
3712 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
3713 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04)
3714{
3715 typedef bsl::pair<iterator, bool> ResultType;
3716
3717 bool isInsertedFlag = false;
3718
3719 HashTableLink *result = d_impl.emplaceIfMissing(
3720 &isInsertedFlag,
3721 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
3722 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
3723 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
3724 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04));
3725
3726 return ResultType(iterator(result), isInsertedFlag);
3727}
3728#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 4
3729
3730#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 5
3731template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3732template <class Args_01,
3733 class Args_02,
3734 class Args_03,
3735 class Args_04,
3736 class Args_05>
3737bsl::pair<
3738 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3739 bool>
3740unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3741 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
3742 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
3743 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
3744 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
3745 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05)
3746{
3747 typedef bsl::pair<iterator, bool> ResultType;
3748
3749 bool isInsertedFlag = false;
3750
3751 HashTableLink *result = d_impl.emplaceIfMissing(
3752 &isInsertedFlag,
3753 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
3754 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
3755 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
3756 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
3757 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05));
3758
3759 return ResultType(iterator(result), isInsertedFlag);
3760}
3761#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 5
3762
3763#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 6
3764template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3765template <class Args_01,
3766 class Args_02,
3767 class Args_03,
3768 class Args_04,
3769 class Args_05,
3770 class Args_06>
3771bsl::pair<
3772 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3773 bool>
3774unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3775 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
3776 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
3777 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
3778 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
3779 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
3780 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06)
3781{
3782 typedef bsl::pair<iterator, bool> ResultType;
3783
3784 bool isInsertedFlag = false;
3785
3786 HashTableLink *result = d_impl.emplaceIfMissing(
3787 &isInsertedFlag,
3788 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
3789 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
3790 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
3791 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
3792 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
3793 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06));
3794
3795 return ResultType(iterator(result), isInsertedFlag);
3796}
3797#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 6
3798
3799#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 7
3800template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3801template <class Args_01,
3802 class Args_02,
3803 class Args_03,
3804 class Args_04,
3805 class Args_05,
3806 class Args_06,
3807 class Args_07>
3808bsl::pair<
3809 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3810 bool>
3811unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3812 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
3813 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
3814 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
3815 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
3816 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
3817 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
3818 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07)
3819{
3820 typedef bsl::pair<iterator, bool> ResultType;
3821
3822 bool isInsertedFlag = false;
3823
3824 HashTableLink *result = d_impl.emplaceIfMissing(
3825 &isInsertedFlag,
3826 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
3827 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
3828 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
3829 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
3830 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
3831 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
3832 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07));
3833
3834 return ResultType(iterator(result), isInsertedFlag);
3835}
3836#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 7
3837
3838#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 8
3839template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3840template <class Args_01,
3841 class Args_02,
3842 class Args_03,
3843 class Args_04,
3844 class Args_05,
3845 class Args_06,
3846 class Args_07,
3847 class Args_08>
3848bsl::pair<
3849 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3850 bool>
3851unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3852 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
3853 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
3854 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
3855 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
3856 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
3857 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
3858 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
3859 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08)
3860{
3861 typedef bsl::pair<iterator, bool> ResultType;
3862
3863 bool isInsertedFlag = false;
3864
3865 HashTableLink *result = d_impl.emplaceIfMissing(
3866 &isInsertedFlag,
3867 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
3868 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
3869 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
3870 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
3871 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
3872 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
3873 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
3874 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08));
3875
3876 return ResultType(iterator(result), isInsertedFlag);
3877}
3878#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 8
3879
3880#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 9
3881template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3882template <class Args_01,
3883 class Args_02,
3884 class Args_03,
3885 class Args_04,
3886 class Args_05,
3887 class Args_06,
3888 class Args_07,
3889 class Args_08,
3890 class Args_09>
3891bsl::pair<
3892 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3893 bool>
3894unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3895 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
3896 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
3897 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
3898 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
3899 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
3900 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
3901 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
3902 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
3903 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09)
3904{
3905 typedef bsl::pair<iterator, bool> ResultType;
3906
3907 bool isInsertedFlag = false;
3908
3909 HashTableLink *result = d_impl.emplaceIfMissing(
3910 &isInsertedFlag,
3911 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
3912 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
3913 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
3914 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
3915 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
3916 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
3917 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
3918 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
3919 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09));
3920
3921 return ResultType(iterator(result), isInsertedFlag);
3922}
3923#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 9
3924
3925#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 10
3926template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3927template <class Args_01,
3928 class Args_02,
3929 class Args_03,
3930 class Args_04,
3931 class Args_05,
3932 class Args_06,
3933 class Args_07,
3934 class Args_08,
3935 class Args_09,
3936 class Args_10>
3937bsl::pair<
3938 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
3939 bool>
3940unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
3941 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
3942 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
3943 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
3944 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
3945 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
3946 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
3947 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
3948 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
3949 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
3950 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10)
3951{
3952 typedef bsl::pair<iterator, bool> ResultType;
3953
3954 bool isInsertedFlag = false;
3955
3956 HashTableLink *result = d_impl.emplaceIfMissing(
3957 &isInsertedFlag,
3958 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
3959 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
3960 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
3961 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
3962 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
3963 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
3964 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
3965 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
3966 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09),
3967 BSLS_COMPILERFEATURES_FORWARD(Args_10, args_10));
3968
3969 return ResultType(iterator(result), isInsertedFlag);
3970}
3971#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 10
3972
3973
3974#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 0
3975template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3976typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
3977unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
3978 const_iterator)
3979{
3980
3981 bool isInsertedFlag = false;
3982
3983 HashTableLink *result = d_impl.emplaceIfMissing(
3984 &isInsertedFlag);
3985
3986 return iterator(result);
3987}
3988#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 0
3989
3990#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 1
3991template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
3992template <class Args_01>
3993typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
3994unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
3995 const_iterator,
3996 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01)
3997{
3998
3999 bool isInsertedFlag = false;
4000
4001 HashTableLink *result = d_impl.emplaceIfMissing(
4002 &isInsertedFlag,
4003 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01));
4004
4005 return iterator(result);
4006}
4007#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 1
4008
4009#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 2
4010template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4011template <class Args_01,
4012 class Args_02>
4013typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4014unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
4015 const_iterator,
4016 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4017 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02)
4018{
4019
4020 bool isInsertedFlag = false;
4021
4022 HashTableLink *result = d_impl.emplaceIfMissing(
4023 &isInsertedFlag,
4024 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4025 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02));
4026
4027 return iterator(result);
4028}
4029#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 2
4030
4031#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 3
4032template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4033template <class Args_01,
4034 class Args_02,
4035 class Args_03>
4036typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4037unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
4038 const_iterator,
4039 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4040 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4041 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03)
4042{
4043
4044 bool isInsertedFlag = false;
4045
4046 HashTableLink *result = d_impl.emplaceIfMissing(
4047 &isInsertedFlag,
4048 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4049 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4050 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03));
4051
4052 return iterator(result);
4053}
4054#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 3
4055
4056#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 4
4057template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4058template <class Args_01,
4059 class Args_02,
4060 class Args_03,
4061 class Args_04>
4062typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4063unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
4064 const_iterator,
4065 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4066 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4067 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4068 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04)
4069{
4070
4071 bool isInsertedFlag = false;
4072
4073 HashTableLink *result = d_impl.emplaceIfMissing(
4074 &isInsertedFlag,
4075 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4076 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4077 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4078 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04));
4079
4080 return iterator(result);
4081}
4082#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 4
4083
4084#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 5
4085template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4086template <class Args_01,
4087 class Args_02,
4088 class Args_03,
4089 class Args_04,
4090 class Args_05>
4091typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4092unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
4093 const_iterator,
4094 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4095 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4096 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4097 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4098 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05)
4099{
4100
4101 bool isInsertedFlag = false;
4102
4103 HashTableLink *result = d_impl.emplaceIfMissing(
4104 &isInsertedFlag,
4105 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4106 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4107 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4108 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4109 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05));
4110
4111 return iterator(result);
4112}
4113#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 5
4114
4115#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 6
4116template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4117template <class Args_01,
4118 class Args_02,
4119 class Args_03,
4120 class Args_04,
4121 class Args_05,
4122 class Args_06>
4123typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4124unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
4125 const_iterator,
4126 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4127 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4128 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4129 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4130 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
4131 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06)
4132{
4133
4134 bool isInsertedFlag = false;
4135
4136 HashTableLink *result = d_impl.emplaceIfMissing(
4137 &isInsertedFlag,
4138 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4139 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4140 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4141 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4142 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
4143 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06));
4144
4145 return iterator(result);
4146}
4147#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 6
4148
4149#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 7
4150template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4151template <class Args_01,
4152 class Args_02,
4153 class Args_03,
4154 class Args_04,
4155 class Args_05,
4156 class Args_06,
4157 class Args_07>
4158typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4159unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
4160 const_iterator,
4161 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4162 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4163 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4164 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4165 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
4166 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
4167 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07)
4168{
4169
4170 bool isInsertedFlag = false;
4171
4172 HashTableLink *result = d_impl.emplaceIfMissing(
4173 &isInsertedFlag,
4174 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4175 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4176 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4177 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4178 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
4179 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
4180 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07));
4181
4182 return iterator(result);
4183}
4184#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 7
4185
4186#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 8
4187template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4188template <class Args_01,
4189 class Args_02,
4190 class Args_03,
4191 class Args_04,
4192 class Args_05,
4193 class Args_06,
4194 class Args_07,
4195 class Args_08>
4196typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4197unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
4198 const_iterator,
4199 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4200 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4201 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4202 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4203 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
4204 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
4205 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
4206 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08)
4207{
4208
4209 bool isInsertedFlag = false;
4210
4211 HashTableLink *result = d_impl.emplaceIfMissing(
4212 &isInsertedFlag,
4213 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4214 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4215 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4216 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4217 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
4218 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
4219 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
4220 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08));
4221
4222 return iterator(result);
4223}
4224#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 8
4225
4226#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 9
4227template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4228template <class Args_01,
4229 class Args_02,
4230 class Args_03,
4231 class Args_04,
4232 class Args_05,
4233 class Args_06,
4234 class Args_07,
4235 class Args_08,
4236 class Args_09>
4237typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4238unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
4239 const_iterator,
4240 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4241 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4242 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4243 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4244 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
4245 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
4246 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
4247 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
4248 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09)
4249{
4250
4251 bool isInsertedFlag = false;
4252
4253 HashTableLink *result = d_impl.emplaceIfMissing(
4254 &isInsertedFlag,
4255 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4256 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4257 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4258 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4259 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
4260 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
4261 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
4262 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
4263 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09));
4264
4265 return iterator(result);
4266}
4267#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 9
4268
4269#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 10
4270template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4271template <class Args_01,
4272 class Args_02,
4273 class Args_03,
4274 class Args_04,
4275 class Args_05,
4276 class Args_06,
4277 class Args_07,
4278 class Args_08,
4279 class Args_09,
4280 class Args_10>
4281typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4282unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
4283 const_iterator,
4284 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4285 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4286 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4287 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4288 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
4289 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
4290 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
4291 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
4292 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
4293 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10)
4294{
4295
4296 bool isInsertedFlag = false;
4297
4298 HashTableLink *result = d_impl.emplaceIfMissing(
4299 &isInsertedFlag,
4300 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4301 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4302 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4303 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4304 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
4305 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
4306 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
4307 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
4308 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09),
4309 BSLS_COMPILERFEATURES_FORWARD(Args_10, args_10));
4310
4311 return iterator(result);
4312}
4313#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_D >= 10
4314
4315#else
4316// The generated code below is a workaround for the absence of perfect
4317// forwarding in some compilers.
4318template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4319template <class... Args>
4320bsl::pair<
4321 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
4322 bool>
4323unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace(
4325{
4326 typedef bsl::pair<iterator, bool> ResultType;
4327
4328 bool isInsertedFlag = false;
4329
4330 HashTableLink *result = d_impl.emplaceIfMissing(
4331 &isInsertedFlag,
4332 BSLS_COMPILERFEATURES_FORWARD(Args, args)...);
4333
4334 return ResultType(iterator(result), isInsertedFlag);
4335}
4336
4337template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4338template <class... Args>
4339typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4340unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::emplace_hint(
4341 const_iterator,
4343{
4344
4345 bool isInsertedFlag = false;
4346
4347 HashTableLink *result = d_impl.emplaceIfMissing(
4348 &isInsertedFlag,
4349 BSLS_COMPILERFEATURES_FORWARD(Args, args)...);
4350
4351 return iterator(result);
4352}
4353// }}} END GENERATED CODE
4354#endif
4355
4356template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4357inline
4358typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4359unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::erase(
4360 const_iterator position)
4361{
4362 BSLS_ASSERT_SAFE(position != this->end());
4363
4364 return iterator(d_impl.remove(position.node()));
4365}
4366
4367template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4368inline
4369typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4370unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::erase(iterator position)
4371{
4372 return erase(const_iterator(position));
4373}
4374
4375template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4376typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
4377unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::erase(const key_type& key)
4378{
4379 HashTableLink *target = d_impl.find(key);
4380 if (target) {
4381 d_impl.remove(target);
4382 return 1; // RETURN
4383 }
4384 else {
4385 return 0; // RETURN
4386 }
4387}
4388
4389template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4390typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4391unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::erase(const_iterator first,
4392 const_iterator last)
4393{
4394
4395#if defined BDE_BUILD_TARGET_SAFE_2
4396 if (first != last) {
4397 iterator it = this->begin();
4398 const iterator end = this->end();
4399 for (; it != first; ++it) {
4400 BSLS_ASSERT(last != it);
4401 BSLS_ASSERT(end != it);
4402 }
4403 for (; it != last; ++it) {
4404 BSLS_ASSERT(end != it);
4405 }
4406 }
4407#endif
4408
4409 while (first != last) {
4410 first = this->erase(first);
4411 }
4412
4413 return iterator(first.node()); // convert from const_iterator
4414}
4415
4416template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4417inline
4418bool unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::contains(
4419 const key_type& key) const
4420{
4421 return find(key) != end();
4422}
4423
4424template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4425inline
4426typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4427unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::find(const key_type& key)
4428{
4429 return iterator(d_impl.find(key));
4430}
4431
4432template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4433inline
4434pair<typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
4435 bool>
4436unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::insert(
4437 const value_type& value)
4438{
4439 typedef bsl::pair<iterator, bool> ResultType;
4440
4441 bool isInsertedFlag = false;
4442
4443 HashTableLink *result = d_impl.insertIfMissing(&isInsertedFlag, value);
4444
4445 return ResultType(iterator(result), isInsertedFlag);
4446}
4447
4448template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4449inline
4450typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4451unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::insert(
4452 const_iterator,
4453 const value_type& value)
4454{
4455 bool isInsertedFlag; // not used
4456
4457 HashTableLink *result = d_impl.insertIfMissing(&isInsertedFlag, value);
4458
4459 return iterator(result);
4460}
4461
4462template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4463template <class INPUT_ITERATOR>
4464void unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::insert(
4465 INPUT_ITERATOR first,
4466 INPUT_ITERATOR last)
4467{
4468 difference_type maxInsertions =
4469 ::BloombergLP::bslstl::IteratorUtil::insertDistance(first, last);
4470 if (0 < maxInsertions) {
4471 this->reserve(this->size() + maxInsertions);
4472 }
4473 else {
4474 BSLS_ASSERT_SAFE(0 == maxInsertions);
4475 }
4476
4477 bool isInsertedFlag; // not used
4478 while (first != last) {
4479 d_impl.emplaceIfMissing(&isInsertedFlag, *first);
4480 ++first;
4481 }
4482}
4483
4484#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
4485template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4486void unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::insert(
4487 std::initializer_list<value_type> values)
4488{
4489 insert(values.begin(), values.end());
4490}
4491#endif
4492
4493// {{{ BEGIN GENERATED CODE
4494// The generated code below is a workaround for the absence of perfect
4495// forwarding in some compilers.
4496template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4497template <class BDE_OTHER_TYPE>
4499 bool>
4501 const KEY& key,
4502 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj)
4503{
4504 typedef bsl::pair<iterator, bool> ResultType;
4505 bool isInsertedFlag = false;
4506 HashTableLink *result = d_impl.insertOrAssign(
4507 &isInsertedFlag,
4508 NULL,
4509 key,
4510 BSLS_COMPILERFEATURES_FORWARD(BDE_OTHER_TYPE, obj));
4511 return ResultType(iterator(result), isInsertedFlag);
4512}
4513
4514template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4515template <class BDE_OTHER_TYPE>
4517 bool>
4519 BloombergLP::bslmf::MovableRef<KEY> key,
4520 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj)
4521{
4522 typedef bsl::pair<iterator, bool> ResultType;
4523 bool isInsertedFlag = false;
4524 HashTableLink *result = d_impl.insertOrAssign(
4525 &isInsertedFlag,
4526 NULL,
4528 BSLS_COMPILERFEATURES_FORWARD(BDE_OTHER_TYPE, obj));
4529 return ResultType(iterator(result), isInsertedFlag);
4530}
4531
4532template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4533template <class BDE_OTHER_TYPE>
4534typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4536 const_iterator hint,
4537 const KEY& key,
4538 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj)
4539{
4540 bool isInsertedFlag = false;
4541 HashTableLink *result = d_impl.insertOrAssign(
4542 &isInsertedFlag,
4543 hint.node(),
4544 key,
4545 BSLS_COMPILERFEATURES_FORWARD(BDE_OTHER_TYPE, obj));
4546 return iterator(result);
4547}
4548
4549template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4550template <class BDE_OTHER_TYPE>
4551typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator
4553 const_iterator hint,
4554 BloombergLP::bslmf::MovableRef<KEY> key,
4555 BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) obj)
4556{
4557 bool isInsertedFlag = false;
4558 HashTableLink *result = d_impl.insertOrAssign(
4559 &isInsertedFlag,
4560 hint.node(),
4562 BSLS_COMPILERFEATURES_FORWARD(BDE_OTHER_TYPE, obj));
4563 return iterator(result);
4564}
4565// }}} END GENERATED CODE
4566
4567template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4568bsl::pair<
4569 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator,
4570 typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::iterator>
4571unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::equal_range(
4572 const key_type& key)
4573{
4574 typedef bsl::pair<iterator, iterator> ResultType;
4575
4576 HashTableLink *first = d_impl.find(key);
4577 return first ? ResultType(iterator(first), iterator(first->nextLink()))
4578 : ResultType(iterator(0), iterator(0));
4579}
4580
4581template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4582inline
4583void
4584unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::max_load_factor(
4585 float newMaxLoadFactor)
4586{
4587 d_impl.setMaxLoadFactor(newMaxLoadFactor);
4588}
4589
4590template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4591inline
4592void
4593unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::rehash(
4594 size_type numBuckets)
4595{
4596 d_impl.rehashForNumBuckets(numBuckets);
4597}
4598
4599template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4600inline
4601void
4602unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::reserve(
4603 size_type numElements)
4604{
4605 d_impl.reserveForNumElements(numElements);
4606}
4607
4608template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4609inline
4610void
4611unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::swap(unordered_map& other)
4613 AllocatorTraits::is_always_equal::value &&
4614 bsl::is_nothrow_swappable<HASH>::value &&
4615 bsl::is_nothrow_swappable<EQUAL>::value)
4616{
4617 d_impl.swap(other.d_impl);
4618}
4619
4620#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
4621// {{{ BEGIN GENERATED CODE
4622// Command line: sim_cpp11_features.pl bslstl_unorderedmap.h
4623#ifndef BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT
4624#define BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT 10
4625#endif
4626#ifndef BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F
4627#define BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT
4628#endif
4629#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 0
4630template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4631inline
4632bsl::pair<
4634 bool>
4636 const KEY& key)
4637{
4638 typedef bsl::pair<iterator, bool> ResultType;
4639 bool isInsertedFlag = false;
4640 HashTableLink *result = d_impl.tryEmplace(
4641 &isInsertedFlag,
4642 NULL,
4643 key);
4644
4645 return ResultType(iterator(result), isInsertedFlag);
4646}
4647#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 0
4648
4649#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 1
4650template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4651template <class Args_01>
4652inline
4653bsl::pair<
4655 bool>
4657 const KEY& key,
4658 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01)
4659{
4660 typedef bsl::pair<iterator, bool> ResultType;
4661 bool isInsertedFlag = false;
4662 HashTableLink *result = d_impl.tryEmplace(
4663 &isInsertedFlag,
4664 NULL,
4665 key,
4666 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01));
4667
4668 return ResultType(iterator(result), isInsertedFlag);
4669}
4670#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 1
4671
4672#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 2
4673template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4674template <class Args_01,
4675 class Args_02>
4676inline
4677bsl::pair<
4679 bool>
4681 const KEY& key,
4682 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4683 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02)
4684{
4685 typedef bsl::pair<iterator, bool> ResultType;
4686 bool isInsertedFlag = false;
4687 HashTableLink *result = d_impl.tryEmplace(
4688 &isInsertedFlag,
4689 NULL,
4690 key,
4691 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4692 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02));
4693
4694 return ResultType(iterator(result), isInsertedFlag);
4695}
4696#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 2
4697
4698#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 3
4699template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4700template <class Args_01,
4701 class Args_02,
4702 class Args_03>
4703inline
4704bsl::pair<
4706 bool>
4708 const KEY& key,
4709 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4710 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4711 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03)
4712{
4713 typedef bsl::pair<iterator, bool> ResultType;
4714 bool isInsertedFlag = false;
4715 HashTableLink *result = d_impl.tryEmplace(
4716 &isInsertedFlag,
4717 NULL,
4718 key,
4719 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4720 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4721 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03));
4722
4723 return ResultType(iterator(result), isInsertedFlag);
4724}
4725#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 3
4726
4727#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 4
4728template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4729template <class Args_01,
4730 class Args_02,
4731 class Args_03,
4732 class Args_04>
4733inline
4734bsl::pair<
4736 bool>
4738 const KEY& key,
4739 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4740 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4741 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4742 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04)
4743{
4744 typedef bsl::pair<iterator, bool> ResultType;
4745 bool isInsertedFlag = false;
4746 HashTableLink *result = d_impl.tryEmplace(
4747 &isInsertedFlag,
4748 NULL,
4749 key,
4750 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4751 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4752 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4753 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04));
4754
4755 return ResultType(iterator(result), isInsertedFlag);
4756}
4757#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 4
4758
4759#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 5
4760template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4761template <class Args_01,
4762 class Args_02,
4763 class Args_03,
4764 class Args_04,
4765 class Args_05>
4766inline
4767bsl::pair<
4769 bool>
4771 const KEY& key,
4772 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4773 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4774 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4775 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4776 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05)
4777{
4778 typedef bsl::pair<iterator, bool> ResultType;
4779 bool isInsertedFlag = false;
4780 HashTableLink *result = d_impl.tryEmplace(
4781 &isInsertedFlag,
4782 NULL,
4783 key,
4784 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4785 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4786 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4787 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4788 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05));
4789
4790 return ResultType(iterator(result), isInsertedFlag);
4791}
4792#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 5
4793
4794#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 6
4795template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4796template <class Args_01,
4797 class Args_02,
4798 class Args_03,
4799 class Args_04,
4800 class Args_05,
4801 class Args_06>
4802inline
4803bsl::pair<
4805 bool>
4807 const KEY& key,
4808 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4809 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4810 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4811 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4812 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
4813 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06)
4814{
4815 typedef bsl::pair<iterator, bool> ResultType;
4816 bool isInsertedFlag = false;
4817 HashTableLink *result = d_impl.tryEmplace(
4818 &isInsertedFlag,
4819 NULL,
4820 key,
4821 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4822 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4823 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4824 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4825 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
4826 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06));
4827
4828 return ResultType(iterator(result), isInsertedFlag);
4829}
4830#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 6
4831
4832#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 7
4833template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4834template <class Args_01,
4835 class Args_02,
4836 class Args_03,
4837 class Args_04,
4838 class Args_05,
4839 class Args_06,
4840 class Args_07>
4841inline
4842bsl::pair<
4844 bool>
4846 const KEY& key,
4847 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4848 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4849 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4850 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4851 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
4852 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
4853 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07)
4854{
4855 typedef bsl::pair<iterator, bool> ResultType;
4856 bool isInsertedFlag = false;
4857 HashTableLink *result = d_impl.tryEmplace(
4858 &isInsertedFlag,
4859 NULL,
4860 key,
4861 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4862 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4863 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4864 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4865 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
4866 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
4867 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07));
4868
4869 return ResultType(iterator(result), isInsertedFlag);
4870}
4871#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 7
4872
4873#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 8
4874template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4875template <class Args_01,
4876 class Args_02,
4877 class Args_03,
4878 class Args_04,
4879 class Args_05,
4880 class Args_06,
4881 class Args_07,
4882 class Args_08>
4883inline
4884bsl::pair<
4886 bool>
4888 const KEY& key,
4889 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4890 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4891 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4892 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4893 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
4894 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
4895 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
4896 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08)
4897{
4898 typedef bsl::pair<iterator, bool> ResultType;
4899 bool isInsertedFlag = false;
4900 HashTableLink *result = d_impl.tryEmplace(
4901 &isInsertedFlag,
4902 NULL,
4903 key,
4904 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4905 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4906 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4907 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4908 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
4909 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
4910 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
4911 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08));
4912
4913 return ResultType(iterator(result), isInsertedFlag);
4914}
4915#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 8
4916
4917#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 9
4918template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4919template <class Args_01,
4920 class Args_02,
4921 class Args_03,
4922 class Args_04,
4923 class Args_05,
4924 class Args_06,
4925 class Args_07,
4926 class Args_08,
4927 class Args_09>
4928inline
4929bsl::pair<
4931 bool>
4933 const KEY& key,
4934 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4935 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4936 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4937 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4938 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
4939 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
4940 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
4941 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
4942 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09)
4943{
4944 typedef bsl::pair<iterator, bool> ResultType;
4945 bool isInsertedFlag = false;
4946 HashTableLink *result = d_impl.tryEmplace(
4947 &isInsertedFlag,
4948 NULL,
4949 key,
4950 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
4951 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
4952 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
4953 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
4954 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
4955 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
4956 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
4957 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
4958 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09));
4959
4960 return ResultType(iterator(result), isInsertedFlag);
4961}
4962#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 9
4963
4964#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 10
4965template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
4966template <class Args_01,
4967 class Args_02,
4968 class Args_03,
4969 class Args_04,
4970 class Args_05,
4971 class Args_06,
4972 class Args_07,
4973 class Args_08,
4974 class Args_09,
4975 class Args_10>
4976inline
4977bsl::pair<
4979 bool>
4981 const KEY& key,
4982 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
4983 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
4984 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
4985 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
4986 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
4987 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
4988 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
4989 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
4990 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
4991 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10)
4992{
4993 typedef bsl::pair<iterator, bool> ResultType;
4994 bool isInsertedFlag = false;
4995 HashTableLink *result = d_impl.tryEmplace(
4996 &isInsertedFlag,
4997 NULL,
4998 key,
4999 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5000 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5001 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5002 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5003 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5004 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
5005 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
5006 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
5007 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09),
5008 BSLS_COMPILERFEATURES_FORWARD(Args_10, args_10));
5009
5010 return ResultType(iterator(result), isInsertedFlag);
5011}
5012#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 10
5013
5014
5015#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 0
5016template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5017inline
5018bsl::pair<
5020 bool>
5022 BloombergLP::bslmf::MovableRef<KEY> key)
5023{
5024 typedef bsl::pair<iterator, bool> ResultType;
5025 bool isInsertedFlag = false;
5026 HashTableLink *result = d_impl.tryEmplace(
5027 &isInsertedFlag,
5028 NULL,
5030
5031 return ResultType(iterator(result), isInsertedFlag);
5032}
5033#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 0
5034
5035#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 1
5036template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5037template <class Args_01>
5038inline
5039bsl::pair<
5041 bool>
5043 BloombergLP::bslmf::MovableRef<KEY> key,
5044 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01)
5045{
5046 typedef bsl::pair<iterator, bool> ResultType;
5047 bool isInsertedFlag = false;
5048 HashTableLink *result = d_impl.tryEmplace(
5049 &isInsertedFlag,
5050 NULL,
5052 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01));
5053
5054 return ResultType(iterator(result), isInsertedFlag);
5055}
5056#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 1
5057
5058#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 2
5059template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5060template <class Args_01,
5061 class Args_02>
5062inline
5063bsl::pair<
5065 bool>
5067 BloombergLP::bslmf::MovableRef<KEY> key,
5068 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5069 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02)
5070{
5071 typedef bsl::pair<iterator, bool> ResultType;
5072 bool isInsertedFlag = false;
5073 HashTableLink *result = d_impl.tryEmplace(
5074 &isInsertedFlag,
5075 NULL,
5077 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5078 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02));
5079
5080 return ResultType(iterator(result), isInsertedFlag);
5081}
5082#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 2
5083
5084#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 3
5085template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5086template <class Args_01,
5087 class Args_02,
5088 class Args_03>
5089inline
5090bsl::pair<
5092 bool>
5094 BloombergLP::bslmf::MovableRef<KEY> key,
5095 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5096 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5097 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03)
5098{
5099 typedef bsl::pair<iterator, bool> ResultType;
5100 bool isInsertedFlag = false;
5101 HashTableLink *result = d_impl.tryEmplace(
5102 &isInsertedFlag,
5103 NULL,
5105 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5106 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5107 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03));
5108
5109 return ResultType(iterator(result), isInsertedFlag);
5110}
5111#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 3
5112
5113#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 4
5114template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5115template <class Args_01,
5116 class Args_02,
5117 class Args_03,
5118 class Args_04>
5119inline
5120bsl::pair<
5122 bool>
5124 BloombergLP::bslmf::MovableRef<KEY> key,
5125 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5126 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5127 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5128 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04)
5129{
5130 typedef bsl::pair<iterator, bool> ResultType;
5131 bool isInsertedFlag = false;
5132 HashTableLink *result = d_impl.tryEmplace(
5133 &isInsertedFlag,
5134 NULL,
5136 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5137 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5138 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5139 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04));
5140
5141 return ResultType(iterator(result), isInsertedFlag);
5142}
5143#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 4
5144
5145#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 5
5146template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5147template <class Args_01,
5148 class Args_02,
5149 class Args_03,
5150 class Args_04,
5151 class Args_05>
5152inline
5153bsl::pair<
5155 bool>
5157 BloombergLP::bslmf::MovableRef<KEY> key,
5158 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5159 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5160 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5161 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5162 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05)
5163{
5164 typedef bsl::pair<iterator, bool> ResultType;
5165 bool isInsertedFlag = false;
5166 HashTableLink *result = d_impl.tryEmplace(
5167 &isInsertedFlag,
5168 NULL,
5170 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5171 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5172 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5173 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5174 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05));
5175
5176 return ResultType(iterator(result), isInsertedFlag);
5177}
5178#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 5
5179
5180#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 6
5181template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5182template <class Args_01,
5183 class Args_02,
5184 class Args_03,
5185 class Args_04,
5186 class Args_05,
5187 class Args_06>
5188inline
5189bsl::pair<
5191 bool>
5193 BloombergLP::bslmf::MovableRef<KEY> key,
5194 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5195 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5196 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5197 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5198 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5199 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06)
5200{
5201 typedef bsl::pair<iterator, bool> ResultType;
5202 bool isInsertedFlag = false;
5203 HashTableLink *result = d_impl.tryEmplace(
5204 &isInsertedFlag,
5205 NULL,
5207 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5208 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5209 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5210 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5211 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5212 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06));
5213
5214 return ResultType(iterator(result), isInsertedFlag);
5215}
5216#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 6
5217
5218#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 7
5219template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5220template <class Args_01,
5221 class Args_02,
5222 class Args_03,
5223 class Args_04,
5224 class Args_05,
5225 class Args_06,
5226 class Args_07>
5227inline
5228bsl::pair<
5230 bool>
5232 BloombergLP::bslmf::MovableRef<KEY> key,
5233 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5234 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5235 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5236 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5237 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5238 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
5239 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07)
5240{
5241 typedef bsl::pair<iterator, bool> ResultType;
5242 bool isInsertedFlag = false;
5243 HashTableLink *result = d_impl.tryEmplace(
5244 &isInsertedFlag,
5245 NULL,
5247 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5248 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5249 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5250 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5251 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5252 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
5253 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07));
5254
5255 return ResultType(iterator(result), isInsertedFlag);
5256}
5257#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 7
5258
5259#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 8
5260template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5261template <class Args_01,
5262 class Args_02,
5263 class Args_03,
5264 class Args_04,
5265 class Args_05,
5266 class Args_06,
5267 class Args_07,
5268 class Args_08>
5269inline
5270bsl::pair<
5272 bool>
5274 BloombergLP::bslmf::MovableRef<KEY> key,
5275 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5276 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5277 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5278 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5279 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5280 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
5281 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
5282 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08)
5283{
5284 typedef bsl::pair<iterator, bool> ResultType;
5285 bool isInsertedFlag = false;
5286 HashTableLink *result = d_impl.tryEmplace(
5287 &isInsertedFlag,
5288 NULL,
5290 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5291 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5292 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5293 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5294 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5295 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
5296 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
5297 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08));
5298
5299 return ResultType(iterator(result), isInsertedFlag);
5300}
5301#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 8
5302
5303#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 9
5304template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5305template <class Args_01,
5306 class Args_02,
5307 class Args_03,
5308 class Args_04,
5309 class Args_05,
5310 class Args_06,
5311 class Args_07,
5312 class Args_08,
5313 class Args_09>
5314inline
5315bsl::pair<
5317 bool>
5319 BloombergLP::bslmf::MovableRef<KEY> key,
5320 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5321 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5322 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5323 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5324 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5325 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
5326 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
5327 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
5328 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09)
5329{
5330 typedef bsl::pair<iterator, bool> ResultType;
5331 bool isInsertedFlag = false;
5332 HashTableLink *result = d_impl.tryEmplace(
5333 &isInsertedFlag,
5334 NULL,
5336 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5337 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5338 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5339 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5340 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5341 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
5342 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
5343 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
5344 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09));
5345
5346 return ResultType(iterator(result), isInsertedFlag);
5347}
5348#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 9
5349
5350#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 10
5351template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5352template <class Args_01,
5353 class Args_02,
5354 class Args_03,
5355 class Args_04,
5356 class Args_05,
5357 class Args_06,
5358 class Args_07,
5359 class Args_08,
5360 class Args_09,
5361 class Args_10>
5362inline
5363bsl::pair<
5365 bool>
5367 BloombergLP::bslmf::MovableRef<KEY> key,
5368 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5369 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5370 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5371 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5372 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5373 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
5374 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
5375 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
5376 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
5377 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10)
5378{
5379 typedef bsl::pair<iterator, bool> ResultType;
5380 bool isInsertedFlag = false;
5381 HashTableLink *result = d_impl.tryEmplace(
5382 &isInsertedFlag,
5383 NULL,
5385 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5386 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5387 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5388 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5389 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5390 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
5391 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
5392 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
5393 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09),
5394 BSLS_COMPILERFEATURES_FORWARD(Args_10, args_10));
5395
5396 return ResultType(iterator(result), isInsertedFlag);
5397}
5398#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 10
5399
5400
5401#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 0
5402template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5403inline
5406 const_iterator hint,
5407 const KEY& key)
5408{
5409 bool isInsertedFlag = false;
5410 HashTableLink *result = d_impl.tryEmplace(
5411 &isInsertedFlag,
5412 hint.node(),
5413 key);
5414
5415 return iterator(result);
5416}
5417#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 0
5418
5419#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 1
5420template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5421template <class Args_01>
5422inline
5425 const_iterator hint,
5426 const KEY& key,
5427 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01)
5428{
5429 bool isInsertedFlag = false;
5430 HashTableLink *result = d_impl.tryEmplace(
5431 &isInsertedFlag,
5432 hint.node(),
5433 key,
5434 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01));
5435
5436 return iterator(result);
5437}
5438#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 1
5439
5440#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 2
5441template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5442template <class Args_01,
5443 class Args_02>
5444inline
5447 const_iterator hint,
5448 const KEY& key,
5449 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5450 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02)
5451{
5452 bool isInsertedFlag = false;
5453 HashTableLink *result = d_impl.tryEmplace(
5454 &isInsertedFlag,
5455 hint.node(),
5456 key,
5457 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5458 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02));
5459
5460 return iterator(result);
5461}
5462#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 2
5463
5464#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 3
5465template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5466template <class Args_01,
5467 class Args_02,
5468 class Args_03>
5469inline
5472 const_iterator hint,
5473 const KEY& key,
5474 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5475 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5476 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03)
5477{
5478 bool isInsertedFlag = false;
5479 HashTableLink *result = d_impl.tryEmplace(
5480 &isInsertedFlag,
5481 hint.node(),
5482 key,
5483 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5484 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5485 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03));
5486
5487 return iterator(result);
5488}
5489#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 3
5490
5491#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 4
5492template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5493template <class Args_01,
5494 class Args_02,
5495 class Args_03,
5496 class Args_04>
5497inline
5500 const_iterator hint,
5501 const KEY& key,
5502 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5503 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5504 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5505 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04)
5506{
5507 bool isInsertedFlag = false;
5508 HashTableLink *result = d_impl.tryEmplace(
5509 &isInsertedFlag,
5510 hint.node(),
5511 key,
5512 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5513 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5514 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5515 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04));
5516
5517 return iterator(result);
5518}
5519#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 4
5520
5521#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 5
5522template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5523template <class Args_01,
5524 class Args_02,
5525 class Args_03,
5526 class Args_04,
5527 class Args_05>
5528inline
5531 const_iterator hint,
5532 const KEY& key,
5533 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5534 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5535 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5536 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5537 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05)
5538{
5539 bool isInsertedFlag = false;
5540 HashTableLink *result = d_impl.tryEmplace(
5541 &isInsertedFlag,
5542 hint.node(),
5543 key,
5544 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5545 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5546 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5547 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5548 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05));
5549
5550 return iterator(result);
5551}
5552#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 5
5553
5554#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 6
5555template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5556template <class Args_01,
5557 class Args_02,
5558 class Args_03,
5559 class Args_04,
5560 class Args_05,
5561 class Args_06>
5562inline
5565 const_iterator hint,
5566 const KEY& key,
5567 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5568 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5569 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5570 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5571 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5572 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06)
5573{
5574 bool isInsertedFlag = false;
5575 HashTableLink *result = d_impl.tryEmplace(
5576 &isInsertedFlag,
5577 hint.node(),
5578 key,
5579 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5580 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5581 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5582 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5583 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5584 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06));
5585
5586 return iterator(result);
5587}
5588#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 6
5589
5590#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 7
5591template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5592template <class Args_01,
5593 class Args_02,
5594 class Args_03,
5595 class Args_04,
5596 class Args_05,
5597 class Args_06,
5598 class Args_07>
5599inline
5602 const_iterator hint,
5603 const KEY& key,
5604 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5605 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5606 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5607 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5608 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5609 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
5610 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07)
5611{
5612 bool isInsertedFlag = false;
5613 HashTableLink *result = d_impl.tryEmplace(
5614 &isInsertedFlag,
5615 hint.node(),
5616 key,
5617 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5618 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5619 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5620 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5621 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5622 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
5623 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07));
5624
5625 return iterator(result);
5626}
5627#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 7
5628
5629#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 8
5630template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5631template <class Args_01,
5632 class Args_02,
5633 class Args_03,
5634 class Args_04,
5635 class Args_05,
5636 class Args_06,
5637 class Args_07,
5638 class Args_08>
5639inline
5642 const_iterator hint,
5643 const KEY& key,
5644 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5645 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5646 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5647 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5648 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5649 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
5650 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
5651 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08)
5652{
5653 bool isInsertedFlag = false;
5654 HashTableLink *result = d_impl.tryEmplace(
5655 &isInsertedFlag,
5656 hint.node(),
5657 key,
5658 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5659 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5660 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5661 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5662 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5663 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
5664 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
5665 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08));
5666
5667 return iterator(result);
5668}
5669#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 8
5670
5671#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 9
5672template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5673template <class Args_01,
5674 class Args_02,
5675 class Args_03,
5676 class Args_04,
5677 class Args_05,
5678 class Args_06,
5679 class Args_07,
5680 class Args_08,
5681 class Args_09>
5682inline
5685 const_iterator hint,
5686 const KEY& key,
5687 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5688 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5689 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5690 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5691 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5692 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
5693 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
5694 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
5695 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09)
5696{
5697 bool isInsertedFlag = false;
5698 HashTableLink *result = d_impl.tryEmplace(
5699 &isInsertedFlag,
5700 hint.node(),
5701 key,
5702 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5703 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5704 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5705 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5706 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5707 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
5708 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
5709 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
5710 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09));
5711
5712 return iterator(result);
5713}
5714#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 9
5715
5716#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 10
5717template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5718template <class Args_01,
5719 class Args_02,
5720 class Args_03,
5721 class Args_04,
5722 class Args_05,
5723 class Args_06,
5724 class Args_07,
5725 class Args_08,
5726 class Args_09,
5727 class Args_10>
5728inline
5731 const_iterator hint,
5732 const KEY& key,
5733 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5734 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5735 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5736 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5737 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5738 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
5739 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
5740 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
5741 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
5742 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10)
5743{
5744 bool isInsertedFlag = false;
5745 HashTableLink *result = d_impl.tryEmplace(
5746 &isInsertedFlag,
5747 hint.node(),
5748 key,
5749 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5750 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5751 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5752 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5753 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5754 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
5755 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
5756 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
5757 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09),
5758 BSLS_COMPILERFEATURES_FORWARD(Args_10, args_10));
5759
5760 return iterator(result);
5761}
5762#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 10
5763
5764
5765#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 0
5766template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5767inline
5770 const_iterator hint,
5771 BloombergLP::bslmf::MovableRef<KEY> key)
5772{
5773 bool isInsertedFlag = false;
5774 HashTableLink *result = d_impl.tryEmplace(
5775 &isInsertedFlag,
5776 hint.node(),
5778
5779 return iterator(result);
5780}
5781#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 0
5782
5783#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 1
5784template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5785template <class Args_01>
5786inline
5789 const_iterator hint,
5790 BloombergLP::bslmf::MovableRef<KEY> key,
5791 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01)
5792{
5793 bool isInsertedFlag = false;
5794 HashTableLink *result = d_impl.tryEmplace(
5795 &isInsertedFlag,
5796 hint.node(),
5798 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01));
5799
5800 return iterator(result);
5801}
5802#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 1
5803
5804#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 2
5805template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5806template <class Args_01,
5807 class Args_02>
5808inline
5811 const_iterator hint,
5812 BloombergLP::bslmf::MovableRef<KEY> key,
5813 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5814 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02)
5815{
5816 bool isInsertedFlag = false;
5817 HashTableLink *result = d_impl.tryEmplace(
5818 &isInsertedFlag,
5819 hint.node(),
5821 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5822 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02));
5823
5824 return iterator(result);
5825}
5826#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 2
5827
5828#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 3
5829template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5830template <class Args_01,
5831 class Args_02,
5832 class Args_03>
5833inline
5836 const_iterator hint,
5837 BloombergLP::bslmf::MovableRef<KEY> key,
5838 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5839 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5840 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03)
5841{
5842 bool isInsertedFlag = false;
5843 HashTableLink *result = d_impl.tryEmplace(
5844 &isInsertedFlag,
5845 hint.node(),
5847 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5848 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5849 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03));
5850
5851 return iterator(result);
5852}
5853#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 3
5854
5855#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 4
5856template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5857template <class Args_01,
5858 class Args_02,
5859 class Args_03,
5860 class Args_04>
5861inline
5864 const_iterator hint,
5865 BloombergLP::bslmf::MovableRef<KEY> key,
5866 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5867 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5868 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5869 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04)
5870{
5871 bool isInsertedFlag = false;
5872 HashTableLink *result = d_impl.tryEmplace(
5873 &isInsertedFlag,
5874 hint.node(),
5876 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5877 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5878 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5879 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04));
5880
5881 return iterator(result);
5882}
5883#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 4
5884
5885#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 5
5886template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5887template <class Args_01,
5888 class Args_02,
5889 class Args_03,
5890 class Args_04,
5891 class Args_05>
5892inline
5895 const_iterator hint,
5896 BloombergLP::bslmf::MovableRef<KEY> key,
5897 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5898 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5899 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5900 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5901 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05)
5902{
5903 bool isInsertedFlag = false;
5904 HashTableLink *result = d_impl.tryEmplace(
5905 &isInsertedFlag,
5906 hint.node(),
5908 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5909 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5910 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5911 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5912 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05));
5913
5914 return iterator(result);
5915}
5916#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 5
5917
5918#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 6
5919template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5920template <class Args_01,
5921 class Args_02,
5922 class Args_03,
5923 class Args_04,
5924 class Args_05,
5925 class Args_06>
5926inline
5929 const_iterator hint,
5930 BloombergLP::bslmf::MovableRef<KEY> key,
5931 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5932 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5933 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5934 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5935 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5936 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06)
5937{
5938 bool isInsertedFlag = false;
5939 HashTableLink *result = d_impl.tryEmplace(
5940 &isInsertedFlag,
5941 hint.node(),
5943 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5944 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5945 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5946 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5947 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5948 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06));
5949
5950 return iterator(result);
5951}
5952#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 6
5953
5954#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 7
5955template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5956template <class Args_01,
5957 class Args_02,
5958 class Args_03,
5959 class Args_04,
5960 class Args_05,
5961 class Args_06,
5962 class Args_07>
5963inline
5966 const_iterator hint,
5967 BloombergLP::bslmf::MovableRef<KEY> key,
5968 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
5969 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
5970 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
5971 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
5972 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
5973 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
5974 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07)
5975{
5976 bool isInsertedFlag = false;
5977 HashTableLink *result = d_impl.tryEmplace(
5978 &isInsertedFlag,
5979 hint.node(),
5981 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
5982 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
5983 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
5984 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
5985 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
5986 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
5987 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07));
5988
5989 return iterator(result);
5990}
5991#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 7
5992
5993#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 8
5994template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
5995template <class Args_01,
5996 class Args_02,
5997 class Args_03,
5998 class Args_04,
5999 class Args_05,
6000 class Args_06,
6001 class Args_07,
6002 class Args_08>
6003inline
6006 const_iterator hint,
6007 BloombergLP::bslmf::MovableRef<KEY> key,
6008 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
6009 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
6010 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
6011 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
6012 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
6013 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
6014 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
6015 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08)
6016{
6017 bool isInsertedFlag = false;
6018 HashTableLink *result = d_impl.tryEmplace(
6019 &isInsertedFlag,
6020 hint.node(),
6022 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
6023 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
6024 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
6025 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
6026 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
6027 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
6028 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
6029 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08));
6030
6031 return iterator(result);
6032}
6033#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 8
6034
6035#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 9
6036template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6037template <class Args_01,
6038 class Args_02,
6039 class Args_03,
6040 class Args_04,
6041 class Args_05,
6042 class Args_06,
6043 class Args_07,
6044 class Args_08,
6045 class Args_09>
6046inline
6049 const_iterator hint,
6050 BloombergLP::bslmf::MovableRef<KEY> key,
6051 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
6052 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
6053 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
6054 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
6055 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
6056 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
6057 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
6058 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
6059 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09)
6060{
6061 bool isInsertedFlag = false;
6062 HashTableLink *result = d_impl.tryEmplace(
6063 &isInsertedFlag,
6064 hint.node(),
6066 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
6067 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
6068 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
6069 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
6070 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
6071 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
6072 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
6073 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
6074 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09));
6075
6076 return iterator(result);
6077}
6078#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 9
6079
6080#if BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 10
6081template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6082template <class Args_01,
6083 class Args_02,
6084 class Args_03,
6085 class Args_04,
6086 class Args_05,
6087 class Args_06,
6088 class Args_07,
6089 class Args_08,
6090 class Args_09,
6091 class Args_10>
6092inline
6095 const_iterator hint,
6096 BloombergLP::bslmf::MovableRef<KEY> key,
6097 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
6098 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
6099 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
6100 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
6101 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
6102 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
6103 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
6104 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
6105 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
6106 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10)
6107{
6108 bool isInsertedFlag = false;
6109 HashTableLink *result = d_impl.tryEmplace(
6110 &isInsertedFlag,
6111 hint.node(),
6113 BSLS_COMPILERFEATURES_FORWARD(Args_01, args_01),
6114 BSLS_COMPILERFEATURES_FORWARD(Args_02, args_02),
6115 BSLS_COMPILERFEATURES_FORWARD(Args_03, args_03),
6116 BSLS_COMPILERFEATURES_FORWARD(Args_04, args_04),
6117 BSLS_COMPILERFEATURES_FORWARD(Args_05, args_05),
6118 BSLS_COMPILERFEATURES_FORWARD(Args_06, args_06),
6119 BSLS_COMPILERFEATURES_FORWARD(Args_07, args_07),
6120 BSLS_COMPILERFEATURES_FORWARD(Args_08, args_08),
6121 BSLS_COMPILERFEATURES_FORWARD(Args_09, args_09),
6122 BSLS_COMPILERFEATURES_FORWARD(Args_10, args_10));
6123
6124 return iterator(result);
6125}
6126#endif // BSLSTL_UNORDEREDMAP_VARIADIC_LIMIT_F >= 10
6127
6128#else
6129// The generated code below is a workaround for the absence of perfect
6130// forwarding in some compilers.
6131template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6132template <class... Args>
6133inline
6134bsl::pair<
6136 bool>
6138 const KEY& key,
6140{
6141 typedef bsl::pair<iterator, bool> ResultType;
6142 bool isInsertedFlag = false;
6143 HashTableLink *result = d_impl.tryEmplace(
6144 &isInsertedFlag,
6145 NULL,
6146 key,
6147 BSLS_COMPILERFEATURES_FORWARD(Args, args)...);
6148
6149 return ResultType(iterator(result), isInsertedFlag);
6150}
6151
6152template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6153template <class... Args>
6154inline
6155bsl::pair<
6157 bool>
6159 BloombergLP::bslmf::MovableRef<KEY> key,
6161{
6162 typedef bsl::pair<iterator, bool> ResultType;
6163 bool isInsertedFlag = false;
6164 HashTableLink *result = d_impl.tryEmplace(
6165 &isInsertedFlag,
6166 NULL,
6168 BSLS_COMPILERFEATURES_FORWARD(Args, args)...);
6169
6170 return ResultType(iterator(result), isInsertedFlag);
6171}
6172
6173template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6174template <class... Args>
6175inline
6178 const_iterator hint,
6179 const KEY& key,
6181{
6182 bool isInsertedFlag = false;
6183 HashTableLink *result = d_impl.tryEmplace(
6184 &isInsertedFlag,
6185 hint.node(),
6186 key,
6187 BSLS_COMPILERFEATURES_FORWARD(Args, args)...);
6188
6189 return iterator(result);
6190}
6191
6192template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6193template <class... Args>
6194inline
6197 const_iterator hint,
6198 BloombergLP::bslmf::MovableRef<KEY> key,
6200{
6201 bool isInsertedFlag = false;
6202 HashTableLink *result = d_impl.tryEmplace(
6203 &isInsertedFlag,
6204 hint.node(),
6206 BSLS_COMPILERFEATURES_FORWARD(Args, args)...);
6207
6208 return iterator(result);
6209}
6210// }}} END GENERATED CODE
6211#endif
6212
6213// ACCESSORS
6214template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6215typename add_lvalue_reference<const VALUE>::type
6216unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::at(
6217 const key_type& key) const
6218{
6219 HashTableLink *target = d_impl.find(key);
6220 if (!target ){
6221 BloombergLP::bslstl::StdExceptUtil::throwOutOfRange(
6222 "unordered_map<...>::at(key_type): invalid key value");
6223 }
6224 return static_cast<HashTableNode *>(target)->value().second;
6225}
6226
6227template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6228inline
6229typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_iterator
6230unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::begin() const
6232{
6233 return const_iterator(d_impl.elementListRoot());
6234}
6235
6236template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6237inline
6238typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_iterator
6239unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::end() const
6241{
6242 return const_iterator();
6243}
6244
6245template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6246inline
6247typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_iterator
6248unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::cbegin() const
6250{
6251 return const_iterator(d_impl.elementListRoot());
6252}
6253
6254template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6255inline
6256typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_iterator
6257unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::cend() const
6259{
6260 return const_iterator();
6261}
6262
6263template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6264inline
6265typename
6266unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_local_iterator
6267unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::begin(size_type index) const
6268{
6269 BSLS_ASSERT_SAFE(index < this->bucket_count());
6270
6271 return const_local_iterator(&d_impl.bucketAtIndex(index));
6272}
6273
6274template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6275inline
6276typename
6277unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_local_iterator
6278unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::end(size_type index) const
6279{
6280 BSLS_ASSERT_SAFE(index < this->bucket_count());
6281
6282 return const_local_iterator(0, &d_impl.bucketAtIndex(index));
6283}
6284
6285
6286template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6287inline
6288typename
6289unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_local_iterator
6290unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::cbegin(
6291 size_type index) const
6292{
6293 BSLS_ASSERT_SAFE(index < this->bucket_count());
6294
6295 return const_local_iterator(&d_impl.bucketAtIndex(index));
6296}
6297
6298template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6299inline
6300typename
6301unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_local_iterator
6302unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::cend(size_type index) const
6303{
6304 BSLS_ASSERT_SAFE(index < this->bucket_count());
6305
6306 return const_local_iterator(0, &d_impl.bucketAtIndex(index));
6307}
6308
6309template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6310inline
6311typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
6312unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::bucket(
6313 const key_type& key) const
6314{
6315 return d_impl.bucketIndexForKey(key);
6316}
6317
6318template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6319inline
6320typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
6321unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::bucket_count() const
6323{
6324 return d_impl.numBuckets();
6325}
6326
6327template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6328inline
6329typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
6330unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::max_bucket_count() const
6332{
6333 return d_impl.maxNumBuckets();
6334}
6335
6336template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6337inline
6338typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
6339unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::bucket_size(
6340 size_type index) const
6341{
6342 BSLS_ASSERT_SAFE(index < this->bucket_count());
6343
6344 return d_impl.countElementsInBucket(index);
6345}
6346
6347template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6348inline
6349typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
6350unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::count(
6351 const key_type& key) const
6352{
6353 return d_impl.find(key) != 0;
6354}
6355
6356template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6357inline
6358bool
6359unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::empty() const
6361{
6362 return 0 == d_impl.size();
6363}
6364
6365template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6366bsl::pair<typename unordered_map<KEY,
6367 VALUE,
6368 HASH,
6369 EQUAL,
6370 ALLOCATOR>::const_iterator,
6371 typename unordered_map<KEY,
6372 VALUE,
6373 HASH,
6374 EQUAL,
6375 ALLOCATOR>::const_iterator>
6376unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::equal_range(
6377 const key_type& key) const
6378{
6380
6381 HashTableLink *first = d_impl.find(key);
6382 return first
6383 ? ResultType(const_iterator(first), const_iterator(first->nextLink()))
6384 : ResultType(const_iterator(0), const_iterator(0));
6385}
6386
6387template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6388inline
6389typename
6390 unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::const_iterator
6391unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::find(
6392 const key_type& key) const
6393{
6394 return const_iterator(d_impl.find(key));
6395}
6396
6397template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6398inline
6399ALLOCATOR
6400unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::get_allocator() const
6402{
6403 return d_impl.allocator();
6404}
6405
6406template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6407inline
6408HASH unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::hash_function() const
6409{
6410 return d_impl.hasher();
6411}
6412
6413template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6414inline
6415EQUAL unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::key_eq() const
6416{
6417 return d_impl.comparator();
6418}
6419
6420template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6421inline
6422float
6423unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::load_factor() const
6425{
6426 return d_impl.loadFactor();
6427}
6428
6429template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6430inline
6431float
6432unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::max_load_factor() const
6434{
6435 return d_impl.maxLoadFactor();
6436}
6437
6438
6439template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6440inline
6441typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
6442unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size() const
6444{
6445 return d_impl.size();
6446}
6447
6448template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6449inline
6450typename unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type
6451unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::max_size() const
6453{
6454 return d_impl.maxSize();
6455}
6456
6457} // close namespace bsl
6458
6459// FREE OPERATORS
6460template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6461inline
6462bool bsl::operator==(
6465{
6466 return lhs.d_impl == rhs.d_impl;
6467}
6468
6469#ifndef BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON
6470template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6471inline
6472bool bsl::operator!=(
6475{
6476 return !(lhs == rhs);
6477}
6478#endif
6479
6480// FREE FUNCTIONS
6481template <class KEY,
6482 class VALUE,
6483 class HASH,
6484 class EQUAL,
6485 class ALLOCATOR,
6486 class PREDICATE>
6487inline
6489bsl::erase_if(unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>& m,
6490 PREDICATE predicate)
6491{
6492 return BloombergLP::bslstl::AlgorithmUtil::containerEraseIf(m, predicate);
6493}
6494
6495template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6496inline
6497void
6501{
6502 a.swap(b);
6503}
6504
6505// ============================================================================
6506// TYPE TRAITS
6507// ============================================================================
6508
6509// Type traits for STL *unordered* *associative* containers:
6510//: o An unordered associative container defines STL iterators.
6511//: o An unordered associative container is bit-wise movable if both functors
6512//: and the allocator are bit-wise movable.
6513//: o An unordered associative container uses 'bslma' allocators if the
6514//: (template parameter) type 'ALLOCATOR' is convertible from
6515//: 'bslma::Allocator *'.
6516
6517
6518namespace bslalg {
6519
6520template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6521struct HasStlIterators<bsl::unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR> >
6523{};
6524
6525} // close namespace bslalg
6526
6527namespace bslma {
6528
6529template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6530struct UsesBslmaAllocator<bsl::unordered_map<KEY,
6531 VALUE,
6532 HASH,
6533 EQUAL,
6534 ALLOCATOR> >
6535 : bsl::is_convertible<Allocator*, ALLOCATOR>::type
6536{};
6537
6538} // close namespace bslma
6539
6540namespace bslmf {
6541
6542template <class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR>
6543struct IsBitwiseMoveable<
6544 bsl::unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR> >
6545 : ::BloombergLP::bslmf::IsBitwiseMoveable<BloombergLP::bslstl::HashTable<
6546 ::BloombergLP::bslstl::
6547 UnorderedMapKeyConfiguration<KEY, bsl::pair<const KEY, VALUE> >,
6548 HASH,
6549 EQUAL,
6550 ALLOCATOR> >::type
6551{};
6552
6553} // close namespace bslma
6554
6555
6556#else // if ! defined(DEFINED_BSLSTL_UNORDEREDMAP_H)
6557# error Not valid except when included from bslstl_unorderedmap.h
6558#endif // ! defined(COMPILING_BSLSTL_UNORDEREDMAP_H)
6559
6560#endif // ! defined(INCLUDED_BSLSTL_UNORDEREDMAP_CPP03)
6561
6562// ----------------------------------------------------------------------------
6563// Copyright 2013 Bloomberg Finance L.P.
6564//
6565// Licensed under the Apache License, Version 2.0 (the "License");
6566// you may not use this file except in compliance with the License.
6567// You may obtain a copy of the License at
6568//
6569// http://www.apache.org/licenses/LICENSE-2.0
6570//
6571// Unless required by applicable law or agreed to in writing, software
6572// distributed under the License is distributed on an "AS IS" BASIS,
6573// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6574// See the License for the specific language governing permissions and
6575// limitations under the License.
6576// ----------------------------- END-OF-FILE ----------------------------------
6577
6578/** @} */
6579/** @} */
6580/** @} */
Definition bslma_bslallocator.h:580
Definition bslstl_pair.h:1210
Definition bslstl_unorderedmap.h:1089
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_unorderedmap.h:1559
const_iterator cbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3350
pair< iterator, bool > insert_or_assign(const KEY &key, BDE_OTHER_TYPE &&obj)
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this unordered map.
Definition bslstl_unorderedmap.h:3544
AllocatorTraits::size_type size_type
Definition bslstl_unorderedmap.h:1152
float load_factor() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3525
friend bool operator==(const unordered_map< KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2 > &, const unordered_map< KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2 > &)
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:2894
AllocatorTraits::pointer pointer
Definition bslstl_unorderedmap.h:1154
value_type & reference
Definition bslstl_unorderedmap.h:1149
EQUAL key_equal
Definition bslstl_unorderedmap.h:1146
AllocatorTraits::const_pointer const_pointer
Definition bslstl_unorderedmap.h:1155
ALLOCATOR allocator_type
Definition bslstl_unorderedmap.h:1147
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition bslstl_unorderedmap.h:2950
size_type bucket(const key_type &key) const
Definition bslstl_unorderedmap.h:3414
void rehash(size_type numBuckets)
Definition bslstl_unorderedmap.h:3206
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_unorderedmap.h:1800
HASH hash_function() const
Definition bslstl_unorderedmap.h:3510
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3502
HASH hasher
Definition bslstl_unorderedmap.h:1145
BloombergLP::bslstl::HashTableBucketIterator< value_type, difference_type > local_iterator
Definition bslstl_unorderedmap.h:1162
void reserve(size_type numElements)
Definition bslstl_unorderedmap.h:3215
pair< iterator, bool > insert(const value_type &value)
Definition bslstl_unorderedmap.h:3051
iterator erase(const_iterator position)
Definition bslstl_unorderedmap.h:2974
EQUAL key_eq() const
Definition bslstl_unorderedmap.h:3517
pair< iterator, bool > emplace(Args &&... args)
const value_type & const_reference
Definition bslstl_unorderedmap.h:1150
size_type max_size() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3553
BloombergLP::bslstl::HashTableBucketIterator< const value_type, difference_type > const_local_iterator
Definition bslstl_unorderedmap.h:1164
const_iterator cend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3359
void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:2922
unordered_map()
Definition bslstl_unorderedmap.h:2631
float max_load_factor() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3534
BloombergLP::bslstl::HashTableIterator< value_type, difference_type > iterator
Definition bslstl_unorderedmap.h:1158
AllocatorTraits::difference_type difference_type
Definition bslstl_unorderedmap.h:1153
bsl::pair< const KEY, VALUE > value_type
Definition bslstl_unorderedmap.h:1144
size_type max_bucket_count() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3432
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_unorderedmap.h:2059
KEY key_type
Definition bslstl_unorderedmap.h:1142
add_lvalue_reference< VALUE >::type at(const key_type &key)
Definition bslstl_unorderedmap.h:2870
VALUE mapped_type
Definition bslstl_unorderedmap.h:1143
size_type bucket_count() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3423
void swap(unordered_map &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits pair< iterator, bool > try_emplace(const KEY &key, Args &&... args)
Definition bslstl_unorderedmap.h:1875
bool contains(const key_type &key) const
Definition bslstl_unorderedmap.h:3033
iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:2885
BloombergLP::bslstl::HashTableIterator< const value_type, difference_type > const_iterator
Definition bslstl_unorderedmap.h:1160
bool empty() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3461
size_type bucket_size(size_type index) const
Definition bslstl_unorderedmap.h:3441
#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
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
t_TYPE & type
This typedef defines the return type of this meta function.
Definition bslmf_addlvaluereference.h:129
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 bslmf_enableif.h:525
Definition bslstl_equalto.h:311
Definition bslstl_hash.h:498
Definition bslmf_isconvertible.h:867