Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The rest of the data structures in the STL follow the same (anti-)pattern.

They all either take ownership of your data, or point at your data unidirectionally.

This means that given a pointer to your data you cannot, for example, delete it from multiple data structures it is contained within without going from these structures roots to re-find the pointers to your data.

Whereas with intrusive data structures (the way it is done in the Linux kernel and other "advanced" C projects), you can easily embed your structure in multiple data structures, such that you can do very quick deletion or modification of the data without re-finding it.



I think Boost has something like this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: