
"Mathias Gaunard" <mathias.gaunard@etu.u-bordeaux1.fr> wrote in message news:eteg9r$hks$1@sea.gmane.org...
Tom Brinkman wrote:
I use STL now like its second nature. As the Intrusive library proposes to be an alternative to STL for some situations, I am intrigued. I have no background with intrusive containers so I'm not shur why I would use one.
I would like to second that. Clearly stated problem domain is a primary goal if introduction, especially for the puposes on review.
Here is what I understand:
They're a more time and space efficient alternative for node-based containers of pointers when you have the possibility of modifying the type to make it into a node.
Why? And how much? I need specific numbers.
So basically, if you have std::list<T*>, and you can modify T, then it is more efficient to use std::ilist<T>.
Why? how std::list<T*> prevent you to modify the pointed value and/or how does it affect performance?
Note however, that the container doesn't "own" its contents and is not therefore responsible for destroying them. An intrusive container allocates and frees nothing, it just alters the nodes you provide it with to build the data structure. It's up to the user to allocate and free the nodes, which are actually the object themselves.
IOW this library promotes unsafe programming right? Gennadiy