Re:C Template Library
by humanrebar on Wednesday December 30, 2020 @08:20AM
(#25581398)
An intrusive node has a getter for the next intrusive node. And the data structure would use that getter to organize the elements of the data structure.
Among other implications (different memory locality and allocation guarantees), you could have the same intrusive node object used in several container objects or even classes (though not at the same time). That is, pull an element from a doubly linked list and insert it into a binary tree without reallocation.
Among other implications (different memory locality and allocation guarantees), you could have the same intrusive node object used in several container objects or even classes (though not at the same time). That is, pull an element from a doubly linked list and insert it into a binary tree without reallocation.