I have an std::unordered_map<MyStruct>. It's unordered for extra-fast lookups which is what will be needed most of the time. However, once, at startup, I'd like to iterate over it in order of MyStruct::myInt.

The container currently contains upwards of 2000 elements, and might reach as high as 5-10 thousand.

Is there some way I can iterate over it in an order other than its internal hashing order?