
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?
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" 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.
Granted, allocators will need some special care this way, but a better interface would be worth it.
Hm, do you mean allocator<T>::rebind<slist_node<T>>? It is already there for exactly that purpose (rebinding from T to a container node type). Regards Timmo Stange