
18 Mar
2010
18 Mar
'10
11 p.m.
Rhys Ulerich wrote:
I'm missing something w.r.t. shared_ptr and custom allocators...
I'd like to use the following shared_ptr constructor template
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
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?
boost::checked_deleter<Y>().