Boost logo

Boost Users :

Subject: Re: [Boost-users] [shared_ptr] Using a custom delete function that is a class member function
From: Ryan McConnehey (mccorywork_at_[hidden])
Date: 2009-10-11 15:26:16


Peter Dimov wrote:
> You need boost::bind( &CTNGenerator::makeCTNAvailable, this, _1 ).
> bind will automatically insert the mem_fn for you. Being a member
> function, makeCTNAvailable takes two arguments: the hidden 'this' and
> 'ctn'. _1 routes the pointer argument of the deleter into its proper
> position as 'ctn'.
Thanks everyone for your suggestions. I was able to get the class
behaving correctly by using Peter's solution.

Ryan


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