
9 Jun
2009
9 Jun
'09
1:41 p.m.
There's a problem with using an allocator for the node based containers: they use the allocator to allocate the elements but not the nodes. That implies free store (de)allocations for the nodes which is contrary to the intended purpose of this proposal.
Umm, I beg to differ. If we have a node-based container
xxx<T,...,custom_allocator<T> >
Right. Furthermore, if the node structure is (roughly): template <typename T> struct node { T data; node *prev, *next; }; How would you separate the allocation of node<T> and node<T>.data? Andrew Sutton andrew.n.sutton@gmail.com