
On Nov 29, 2006, at 10:33 AM, Richard Hadsell wrote:
David Klein wrote:
so are there any objections about adding this feature to scoped_ptr?
I'm sure I have seen this discussion before. I believe the issue was the size of scoped_ptr itself. It is supposed to be a lightweight object, no bigger than the pointer it holds. Any added overhead is unacceptable. If you can implement the feature without adding any data members, fine. Otherwise, please create a new class.
<nod> This comes up now and then.
Fwiw, anyone/everyone is welcome to my emulation of the proposed C+
+0X unique_ptr:
http://home.twcny.rr.com/hinnant/cpp_extensions/unique_ptr_03.html
Sorry, it isn't documented. Here's the best documentation I
currently have:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/
n1856.html#Addition%20-%20Class%20template%20unqiue_ptr
The (non)copyright at the top means you can do whatever you want with
the code, including stripping my name out of it.
In a nutshell:
* It has a deleter.
* If the deleter is an empty class, sizeof(unique_ptr