std::unordered_map
Template:cpp/container/unordered map/sidebar
| Defined in header <unordered_map>
|
||
| template< class Key, |
(since C++11) | |
Unordered map is an associative container that contains key-value pairs with unique keys. Search, insertion, and removal have average constant-time complexity.
std::unordered_map meets the requirements of Container, AllocatorAwareContainer, UnorderedAssociativeContainer.
Contents |
Member types
Template:tdcl list begin Template:tdcl list hitem Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list end
Member functions
constructs the unordered_map (public member function) | |
destructs the unordered_map (public member function) | |
| assigns values to the container (public member function) | |
| returns the associated allocator (public member function) | |
Iterators | |
| returns an iterator to the beginning (public member function) | |
| returns an iterator to the end (public member function) | |
Capacity | |
| checks whether the container is empty (public member function) | |
| returns the number of elements (public member function) | |
| returns the maximum possible number of elements (public member function) | |
Modifiers | |
| clears the contents (public member function) | |
| inserts elements (public member function) | |
| constructs element in-place (public member function) | |
| constructs elements in-place using a hint (public member function) | |
| erases elements (public member function) | |
| swaps the contents (public member function) | |
Lookup | |
| access specified element with bounds checking (public member function) | |
| access specified element (public member function) | |
| returns the number of elements matching specific key (public member function) | |
| finds element with specific key (public member function) | |
| returns range of elements matching a specific key (public member function) | |
Bucket interface | |
| returns an iterator to the beginning of the specified bucket (public member function) | |
| returns an iterator to the end of the specified bucket (public member function) | |
| returns the number of buckets (public member function) | |
| returns the maximum number of buckets (public member function) | |
| returns the number of elements in specific bucket (public member function) | |
| returns the bucket for specific key (public member function) | |
Hash policy | |
| returns average number of elements per bucket (public member function) | |
| manages maximum average number of elements per bucket (public member function) | |
| reserves at least the specified number of buckets. This regenerates the hash table. (public member function) | |
| reserves space for at least the specified number of elements. This regenerates the hash table. (public member function) | |
Observers | |
| returns function used to hash the keys (public member function) | |
| returns the function used to compare keys for equality (public member function) | |
Non-member functions
| compares the values in the unordered_map (function template) | |
| specializes the std::swap algorithm (function template) | |