On Sun, 2004-10-17 at 00:04, Matt Austern wrote:
On Oct 16, 2004, at 3:37 AM, Dhruv Matani wrote:
On an unrelated note, would we be interested in providing support for
stateful allocators in gcc4?
Don't we provide it already? Perhaps you mean something by "support
for stateful allocators" than I do, but _Vector_base squirrels away a
copy of the allocator the user provided, all the allocator operations
dispatch to that copy, and get_allocator returns another copy of it.
To me that seems like we're preserving and using state.
What I mean is different. ie. allocators which have "state", meaning
that:
allocator1<type> a;
allocator1<type> b;
a == b; // should not necessarily return true.
So, consider:
list<int, stateful_allocator<int> > l1;
list<int, stateful_allocator<int> > l2;
// Now splice should not work when you try to move around objects from
l1 to l2 or vice-versa.