3 ms·
definitely check out flat_set too! most of the time using a sorted vector as the backing store for these kinds of things ends up being a net win, especially for
by adzm 8y ago
definitely check out flat_set too! most of the time using a sorted vector as the backing store for these kinds of things ends up being a net win, especially for smaller sets, but the size it starts to become a hindrance may surprise you.
- de_watcher 8y agoFlat sets are great. By writing my own implementation (to avoid boost dependency) I kinda understood why they aren't standard: iterators have different invalidation rules and some special sorted-vector-derived useful properties, the map/multimap keys can't be const as in other standard associative containers, etc.