Unordered Associative Containers (C++)

Unordered Associative Containers (C++)

In the C++ programming language, unordered associative containers are a group of class templates in the C++ Standard Library that implement variations of hash tables. Being templates, they can be used to store arbitrary elements, such as integers or custom classes. The following containers are defined in the current revision of the C++ standard: unordered_set, unordered_map, unordered_multiset, unordered_multimap. Each of these containers differ only on constraints placed on their elements.

The unordered associative containers are similar to the associative containers in C++ standard library but have different constraints. As their name implies, the elements in the unordered associative containers are not ordered. This is due to the use of hashing to store objects. The containers can still be iterated through like a regular associative container.

Read more about Unordered Associative Containers (C++):  History, Overview of Functions, Usage Example, Custom Hash Functions