W
W Karas
I see what you mean, but the problem is that there is no separation from
the container to the rest of the software...
That means that any ch ange of the container structure that can't be
hidden needs a complete recompilation of all the client software.
OK, some containers like single linked lists could be easy to do
bit others would be much more complex.
The way the AI would look would need to be radically different
too.
I will wait till your address
http://wkaras.webs.com/cavl_tree.html
to see what you have in mind concerning the API.
This a valid disadvantages of instrusive containers. But in some cases they are outweighed by the advantages. The elements of intrusive containers can be the original ones, not copies. Elements are not restricted to being in the heap, or anywhere else. If the intrusive containers are designed toallow it, elements can be in multiple containers at once.
Again, to be clear, I am not saying you should not provide non-intrusive containers in your implementation. I'm saying split it into two layers, non-intrusive on top of intrusive, so users can use the bottom layer without the top when appropriate.