Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-07-25 10:54:14


From: "Greg Colvin" <gcolvin_at_[hidden]>
> If you are feeling inspired there are two other enhancements I have
> been working on.
>
> One is to allow for the user to specify a delete function or function
> object at construction time, e.g.
>
> shared_ptr<FILE> file_ptr(fopen(file_name,file_mode),fclose);
>
> I think that now with boost::function this is a small step from
> what you have already with your shared_deleter.

Yes... a very small step. I didn't provide a constructor that takes a delete
function (too big interface change) but it can be done.

I didn't want to introduce a dependency on boost::function (used void (*)
(void*) instead) to keep shared_ptr usable on platforms where
boost::function doesn't work (are there any?)

I'll think about this a bit.

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk