
Timmo Stange wrote:
Tobias Schwinger wrote:
What's the difference between that and the standard (non-intrusive) containers?
The same as intrusive containers: Allocation in one shot and having both the actual data and the accounting information in one block of memory.
I might be missing something. Am I?
Yes.
I am not sure. Perhaps I'm the one missing something in your idea, but what you suggested is how list nodes may already look like in a standard library implementation. They use "single-shot allocation"
You're right - I should've taken a look into the source before making noise :).
when T is copy-constructible. If it is not, one needs to use list<T*> and allocate Ts separately. I do not see how that can be avoided when the node type is hidden in the implementation.
Cool, now I understand the purpose of this submission. I vote for a less confusing intro. Thanks, Tobias