
18 Mar
2010
18 Mar
'10
9:27 p.m.
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