[intrusive] list traversing by list_base_hooks
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? thnx, tim -- tim@klingt.org http://tim.klingt.org /"\ ASCII Ribbon Campaign \ / no HTML in email & vCards X no proprietary attachments / \ use open standards
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.
participants (2)
-
Stefan Strasser
-
Tim Blechmann