Hacker News new | ask | show | jobs
by huhtenberg 5023 days ago
THE reason to use "intrusive" containers is to let a piece of data to sit in multiple containers, none of which is primary. I'll give you an skbuff and you show me how to put it on several linked lists and a couple of hashmaps with STL-style containers.
2 comments

That's not the only reason. Another is simplicity.
Store multiple pointers to the same datum?
Then for deletion you need to traverse every data structure in which you store said pointers.