Boost logo

Boost :

From: Eric Frias (efrias_at_[hidden])
Date: 2003-10-30 14:35:16


On Thu, 30 Oct 2003, Vladimir Prus wrote:
>> I was recently looking for a beast similar, but not exactly the same as
>> the numbered_set you describe. Basically, I wanted an "Sequence Set". I
>> want Sequence-like iteration and insertion/removal behavior, but I want
>> O(log n) search. I also want to maintain the invariant that a
>> particular value appears only once in the set.
>
> Looks very similiar to what I wanted.

I just wanted to chime in with a big "me too!" We have a need for this
"Sequence Set" object in many places in our code. We have a lot of
intrusive lists, and we've written a wrapper that keeps the list in sync
with a set. But we've been migrating slowly towards using non-intrusive
containers, and we need a stl-compatible class to use.

For our needs, the sequence doesn't need to be random-access; usually the
sequence is only used to output the contents of the set in the order the
end-user expects. The usual hack of wrapping a list and a set together to
accomplish this feels about as wasteful as using a multiindex_set. I'd love
to see an Sequence Set-like object make it into boost.

-Eric


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk