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.