Hello all
In my GSoC project I need to represent nodes in a linked list. The requirements are:
1. Obtaining an iterator from the value should be a constant time operation 2. Ownership semantics should be similar to boost::ptr_list - that is, objects are owned by only one container and deleted when erased, though there are special functions that allow transfer between containers and releasing an object from a container 3. The list must have a 'closed' flag that determines the behavior of 2 functions that retrieve an iterator to the next and previous node: If it's true, they wrap around, and if it's not they behave like regular ++ and -- on iterators.
Initially I thought about std::list + std::tr1::unordered_map of pointer to node -> iterator, but this is absurd. Then I created my own NodeList class, which worked well enough, but I feel that implementing all the operations is reinventing the wheel. I could use Boost.Intrusive (specifically boost::intrusive::list) to satisfy 1 and 2 out of the box and 3 with a small amount of work. However, I can't find what version of Boost we currently depend on. Boost.Intrusive is a header only library that was released as part of Boost 1.35 in April 2008 (there are no runtime dependencies, so the only possible issue is whether developers run recent enough systems to have it available). It is available in Debian Lenny, as a backport for Etch, and in Ubuntu Hardy LTS. Is it OK to use it?
Regards, Krzysztof Kosiński