Boost logo

Boost Users :

Subject: Re: [Boost-users] [intrusive] list traversing by list_base_hooks
From: Stefan Strasser (strasser_at_[hidden])
Date: 2009-09-23 10:28:26


Am Wednesday 23 September 2009 13:11:10 schrieb Tim Blechmann:
> hi all,
>
> is there a way to traverse a boost::intrusive::list directly from the
> list_base_hook?
>
> i'd like to traverse the list directly from the node something like:
> my_node: public list_base_hook<>
> {
> my_node * previous_node();
> my_node * next_node();
> };
>
> is it possible to implement something like that?
>

there is, see circular_list_algorithms, but I think what you're really looking
for is intrusive::list::iterator_to().
that function is one of the main reasons for using intrusive containers in the
first place.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net