Is there a sorted_vector class, which supports insert() etc.?

Posted by Frank on Stack Overflow See other posts from Stack Overflow or by Frank
Published on 2010-04-25T22:26:50Z Indexed on 2010/04/25 22:33 UTC
Read the original article Hit count: 146

Filed under:
|
|
|
|

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 basically has a similar interface to std::set, but inserts elements into the sorted vector (so that there are no duplicates), uses binary search to find elements, etc.?

I know it's not hard to write, but probably better not to waste time and use an existing implementation anyway.

© Stack Overflow or respective owner

Related posts about c++

Related posts about stl