Boost logo

Boost Users :

Subject: Re: [Boost-users] scoped_ptr with destructor function
From: Jason Cipriani (jason.cipriani_at_[hidden])
Date: 2008-12-04 18:57:52


On Thu, Dec 4, 2008 at 1:58 PM, Kenny Riddile <kfriddile_at_[hidden]> wrote:
> Jason Cipriani wrote:
>>
>> Does boost have something lightweight like a scoped_ptr but that lets
>> you specify a custom delete function, or do I have to use a shared_ptr
>> for that?
>
> I don't believe it has been submitted to boost (not sure why not), but there
> is a unique_ptr implementation at the following link that provides what you
> want:
>
> http://home.twcny.rr.com/hinnant/cpp_extensions/unique_ptr_03.html
>
> I think you can just add include guards to that source, throw it in a header
> called unique_ptr.hpp and call it a day.

Thanks for the link.

Jason


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