Re: [Boost-users] Suggestion for boost`s smart pointers

-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Maitre Bart Sent: Tuesday, November 28, 2006 12:36 PM To: boost-users@lists.boost.org Subject: [Boost-users] Suggestion for boost`s smart pointers
I am assuming I am at the right tribune! (Let me know otherwise)
I would suggest to add a constructor (as well as the supporting members and rules) to scoped_ptr<> that could allow specifying a deleter, as per:
template
scoped_ptr(Y * p, D d); as the same exists for shared_ptr<>.
The deleter feature in shared_ptr is very useful for raii with any kind of resource (variables, functions, objects, etc.). Having it in scoped_ptr will offer the same advantage for noncopyable pointers.
Thank you.
+1 from me too but I think the reason is that people wanted sizeof(scoped_ptr<T>) to be sizeof(T *) (or they don't want it to change)
participants (1)
-
Sohail Somani