[英]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.