This class template implements a value‐semantic container type holding an unordered set of KEY‐VALUE pairs having unique keys that provide a mapping from keys (of template parameter type KEY) to their associated mapped values (of template parameter type VALUE).
Synopsis
Declared in <bslstl_unorderedmap.h>
template<
class KEY,
class VALUE,
class HASH = bsl::hash<KEY>,
class EQUAL = bsl::equal_to<KEY>,
class ALLOCATOR = bsl::allocator<bsl::pair<KEY const, VALUE>>>
class unordered_map;
Description
This class: * supports a complete set of value‐semantic operations * is exception‐neutral (agnostic except for the at method) * is alias‐safe * is const thread‐safe For terminology see {`bsldoc_glossary`}.
Type Aliases
Name |
Description |
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this object and each of its elements. |
Assignment operators |
|
|
|
|
|
|
|
Return the number of buckets in the array of buckets maintained by this unordered map. |
|
Return the number of elements contained in the bucket at the specified |
|
|
|
|
|
Remove all entries from this unordered map. Note that this unordered map will be empty after calling this method, but allocated memory may be retained for future use. |
|
Return |
|
|
|
Insert into this unordered map a newly‐created |
|
Insert into this unordered map a newly‐created |
|
Return |
|
|
|
|
|
|
|
|
|
Return (a copy of) the allocator used for memory allocation by this unordered map. |
|
Return (a copy of) the unary hash functor used by this unordered map to generate a hash value (of type |
|
|
|
|
|
Insert into this map the value of each |
|
Return (a copy of) binary the key‐equality functor used by this unordered map that returns |
|
Return the current ratio between the |
|
Return a theoretical upper bound on the largest number of buckets that this unordered map could possibly manage. Note that there is no guarantee that the unordered map can successfully grow to the returned size, or even close to that size, without running out of resources. |
|
|
|
Return a theoretical upper bound on the largest number of elements that this unordered map could possibly hold. Note that there is no guarantee that the unordered map can successfully grow to the returned size, or even close to that size, without running out of resources. |
|
Subscript operators |
|
Change the size of the array of buckets maintained by this unordered map to at least the specified |
|
Increase the number of buckets of this set to a quantity such that the ratio between the specified |
|
Return the number of elements in this unordered map. |
|
Exchange the value, hasher, key‐equality functor, and |
|
|
Specializations
Name |
Description |
|
This class template implements a value‐semantic container type holding an unordered set of |
Deduction Guides
Name |
Description |
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameters |
Friends
Name |
Description |
Return |
Non-Member Functions
Name |
Description |
Erase all the elements in the specified unordered_map |
|
Return |
|
Exchange the value, hasher, key‐equality functor, and |
Created with MrDocs