|
|
|
|
|
by rafa1981
2366 days ago
|
|
Intrusive lists are very different beasts than lists by value. There are less allocations involved (perf and points of failure), values can be inserted on different lists without new allocations, deletion is O(1), elements can be heterogeneous (different sizes and types), etc etc I seldomly use linked lists, but most of the time i prefer them to be intrusive. There of course are intrusive list implementations on C++. |
|
Using non-intrusive linked lists just feels wrong once you've gotten used to the idea of embedding links, I find there are always better options.
Intrusive lists on the other hand is simply the best solution in some cases.