
24 Aug
2009
24 Aug
'09
4:56 p.m.
Ion Gaztañaga wrote:
Gottlob Frege escribió:
Any thoughts (from anyone?) on my comments about making flat_map's iterators stable? Then it would be a complete replacement to std::map. Tony
Making flat_xxx a template adaptor (like stack or similar) and using stable_vector as the underlying type would make flat_stable_vector a replacement for std::map.
Best,
Ion
I would prefer it as is, but I haven't had a need for iterator stability. I thought the point of a flat_map/flat_set was to be an as-lightweight-as-possible generic associative container, but still with reasonable (O(log n)) lookup time. Perhaps a policy-based approach is possible, or an entirely separate class, e.g., stable_flat_xxx? - Jeff