简体   繁体   English

c ++:迭代std :: hash_map的顺序

[英]c++: The order of iterating through std::hash_map

Iterating through a map is guaranteed to be done by order (according to the defined comparison function). 保证通过顺序迭代(根据定义的比较函数)。

What about a hash_map for example, is there a guaranteed order when iterating through this from begin() to end() ? 例如,hash_map怎么样,当从begin()end()迭代时,是否有保证的顺序?

不, hash_map或标准等价的std::unordered_map无序容器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM