3 ms·
> and std::unordered_map, the more useful general purpose map std::unordered_map is a hash table. It's not a very good hash table but that's what it is, and so
by tialaramex 3y ago
> and std::unordered_map, the more useful general purpose map
std::unordered_map is a hash table. It's not a very good hash table but that's what it is, and so whilst that is much more generally useful, it's also irrelevant to the purpose of map (and thus of flat_map).
It seems to me that if "most code" would be harmed by using flat_map instead of map that's actually good news, since map isn't going anywhere. What I anticipate is the reality is that a considerable amount of code would benefit from using flat_map instead of map, because of the improved performance from linear access.