Boost logo

Boost Users :

Subject: [Boost-users] shared_ptr with custom allocator but default deleter?
From: Rhys Ulerich (rhys.ulerich_at_[hidden])
Date: 2010-03-18 17:27:04


I'm missing something w.r.t. shared_ptr and custom allocators...

I'd like to use the following shared_ptr constructor
        template<class Y, class D, class A> shared_ptr(Y * p, D d, A a);
with a custom allocator but "the usual deleter behavior". I'm
confused about what to supply for 'd'.

Restating my confusion, first pretend the signature was this
        template<class Y, class A> shared_ptr(Y * p, A a);
and ignore the normal shared_ptr two argument constructor for the
moment. Now pretend I could implement this hypothetical two argument
version by delegating to the three argument version. What would I
supply as the 'd' parameter?

- Rhys


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net