For small sets or maps, it\'s usually much faster to just use a sorted vector, instead of the tree-based set/map - especially for something like 5-10 e
I don't know any such implementation, but there are some functions that help working with sorted vectors already in STL, such as lower_bound and upper_bound.