简体   繁体   中英

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或标准等价的std::unordered_map无序容器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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