Hi all,
is it possible with boost::intrusive::slist to obtain the end() iterator from a value object present in a list?
Using s_iterator_to() I can obtain a valid iterator from a value reference but i can't forward iterate from it without knowing the end().
Reading the slist code I found the method slist_iterator::get_container but since is a detail implementation, I prefer not to use it.
I also found that a default construct iterator is almost equivalent to end() for linear slists and should work just fine. For circular slists?
// snipped
struct dummy : public slist_base_hook<> {};
typedef slist<dummy> MyList;
void fn(dummy const& o)
{
MyList::const_iterator it = MyList::s_iterator_to(o);
MyList::const_iterator e = ???;
for (; it != e; ++it) { ... }
}
Regards,
Andrea