4 Dec
2008
4 Dec
'08
6:58 p.m.
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?
Thanks, Jason
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.