cpp/named req/UnorderedAssociativeContainer

Unordered associative containers are s that provide fast lookup of objects based on keys. Worst case complexity is linear but on average much faster for most of the operations.

Unordered associative containers are parametrized by ;, a function object which acts as hash function on ; and , a  evaluating equivalence between s. and  also have a mapped type  associated with the.

If two s are equal according to, must return the same value for both keys.

and can contain at most one element with a given key,  and  instead can have multiple elements with the same key (which must always be adjacent on iterations).

For and  the value type is the same as the key type and both  and  are constant iterators. For and  the value type is.

Elements in an unordered associative container are organized into buckets, keys with the same hash will end up in the same bucket. The number of buckets is increased when the size of the container increases to keep the average number of elements in each bucket under a certain value.

Rehashing invalidates iterator and might cause the elements to be re-arranged in different buckets but it doesn't invalidate references to the elements.

Unordered associative containers meet the requirements of. For and  the requirements of  in  apply to  and (not to ).