Intrusive lists

后端 未结 5 955
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-12 23:53

I\'ve not been able to find too much information about them online. What are they and when are they typically used?

Thanks.

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 00:28

    An intrusive list is one where the pointer to the next list node is stored in the same structure as the node data. This is normally A Bad Thing, as it ties the data to the specific list implementation. Most class libraries (for example, the C++ Standard Library) use non-intrusive lists, where the data knows nothing about the list (or other container) implementation.

提交回复
热议问题