c++ - Does std::unordered_multimap's bucket only contain elements with equivalent keys -


on www.cplusplus.com, states following unordered_multimap,

elements equivalent keys grouped in same bucket , in such way iterator (see equal_range) can iterate through of them.

i know cannot infer statement, i'd know if given bucket only contains elements equivalent keys?

here pertinent requirements:

[c++11: 23.2.5/5]: 2 values k1 , k2 of type key considered equivalent if container’s key_equal function object returns true when passed values. if k1 , k2 equivalent, hash function shall return same value both. [..]

[c++11: 23.2.5/8]: elements of unordered associative container organized buckets. keys same hash code appear in same bucket. [..]

there nothing prohibiting all elements key hash a , all elements key hash b being stored in same bucket. standard library implementation use whether or not fact used.

no standard wording exists make explicit; it's defined omission.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -