
19 Jan
2008
19 Jan
'08
7:56 p.m.
On 19/01/2008, Robert Dailey <rcdailey@gmail.com> wrote:
Thanks, I'll look into that and see if it works. However, I like the method I proposed in my first email better. Is there a reason why it could not be done this way? It seems more intuitive and simple. In addition, you wouldn't need to rely on ADL.
Your idea is basically the same as specifying a clone allocator. The only difference is that the clone allocator needs to know how to allocate objects, not just deallocate them, since you can v.push_back(4) into a ptr_vector<int> v. SFINAE means that you might even be able to get away with only the deallocator, at the cost of a (possibly severely) reduced interface. ~ Scott