Often, it is more efficient to use a sorted std::vector instead of a std::set. Does anyone know a library class sorted_vector, which b
std::vector
std::set
sorted_vector
Here is my sorted_vector class that I've been using in production code for years. It has overloads to let you use a custom predicate. I've used it for containers of pointers, which can be a really nice solution in a lot of use cases.