Unordered associative container mapping unique keys to values.
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 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).
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 in the bucket at |
|
|
|
|
|
Remove all entries from this unordered map. |
|
|
|
|
|
Emplace a newly constructed element if its key is not already present. |
|
Emplace a newly constructed element at |
|
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 each element of |
|
Return (a copy of) binary the key‐equality functor used by this unordered map that returns |
|
Return the current load factor of this unordered map. |
|
Return a theoretical upper bound on the number of buckets. |
|
|
|
Return a theoretical upper bound on the size of this unordered map. |
|
Subscript operators |
|
Rehash this unordered map to at least |
|
Reserve capacity for at least |
|
Return the number of elements in this unordered map. |
|
Exchange the contents of this object with those of |
|
|
Deduction Guides
Name |
Description |
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
|
CTAD guide: deduce |
Friends
Name |
Description |
Return |
Non-Member Functions
Name |
Description |
Erase every element of |
|
Return |
|
Exchange the contents of |
Created with MrDocs