
How would you separate the allocation of node<T> and node<T>.data?
template <typename T> struct node { T * data; node * prev; node * next; };
Even with yours, custom_allocator<T> is not the same as
custom_allocator<node<T>>.
If you were going to design your list to require extra allocation and indirection, sure. Since (I believe that) none of the node-based structures in the std namespace directly allocate objects of type T, it's kind of a moot point. I think this discussion really gets to the heart of the complexity of allocation strategies for data structures that require nested, multi-type allocations. As this problem exists for all allocator types, I think it's way out of the scope of whether or not Christian should be duplicating all of the containers or simply introducing a new allocator type. Andrew Sutton andrew.n.sutton@gmail.com