Boost logo

Boost :

Subject: Re: [boost] [Intrusive] [MultiIndex] Random Access mental model?
From: David Abrahams (dave_at_[hidden])
Date: 2008-11-01 14:00:55

on Sat Nov 01 2008, JOAQUIN M. LOPEZ MUÑOZ <> wrote:

>> Actually, MultiIndex could give me *almost* everything I need by
>> threading a singly-linked list through the hash nodes (instead of
>> doubly-linked). That's enough for a FIFO queue.
> You can do that with Boost.Intrusive, and that will indeed save you
> one pointer per node as compared with the Boost.MultiIndex-based
> solution. If you're resorting to manually combining a hash_map and
> a slist<pointer> then you'd begaining nothing, as in the hash_map+
> deque<pointer> case described in my previous post.
>> Turns out I need a little more than that; I essentially need a bool that
>> tells me whether the node is in the FIFO queue yet. Since I can use a
>> NULL queue pointer for that purpose, it looks like I'll be rolling my
>> own.

I handn't looked at Boost.Intrusive before. While it looks interesting,
it seems pretty complicated and I can't quite see any point in using it
when I could just use Boost.Unordered with a value_type that holds an
additional pointer. Maybe I'm missing something; I don't know.

Dave Abrahams
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at