From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2008-01-19 14:56:50
On 19/01/2008, Robert Dailey <rcdailey_at_[hidden]> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk