2009/10/10 Ryan McConnehey <mccorywork@gmail.com>
I have a class that provides a shared_ptr number.  At the end of the number's life cycle it should be placed back on a list of available numbers.  The shared_ptr's custom deleter function looks like what I need.  I'm able to get a free function to compile as the deleter just fine.  In trying to use a class member function as the custom deleter I've run into compile errors.  I'm not sure where I'm going wrong.  I know the custom deleter need to be copy constructible and I'm probably breaking some assumed requirement.  Any help on what I'm doing wrong would be appreciated.
Ryan

I'm pretty sure you can't provide a functor as the custom deleter, only a free function. Probably due to space efficiency within the shared_ptr blob (4 byte pointer vs ~32 bytes for a boost::function).

Alex