[smart_ptr] sp_deleter_wrapper

Here's the next patch, this time optimizing sp_deleter_wrapper. It replaces the shared_ptr<void> by shared_count, saving the implicitly stored void*. It also removes _internal_get_deleter and makes enable_shared_from_this use basic_get_deleter to take advantage of the workarounds it provides. OK to commit? BTW: One could also remove _internal_less and use: template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b) { return a.get_shared_count() < b.get_shared_count(); } Regards, Daniel

On Sunday 27 April 2008 07:35, Daniel Frey wrote:
On Sun, 2008-04-27 at 13:31 +0200, Daniel Frey wrote:
Here's the next patch, this time optimizing sp_deleter_wrapper. It
The patch was lacking a detail::, corrected version attached. Sorry.
It seems okay to me. Although, I should say the bit that touches _internal_get_deleter is starting to get into shared_ptr code that I don't really have anything to do with. -- Frank

On Sun, 2008-04-27 at 20:18 -0400, Frank Mori Hess wrote:
On Sunday 27 April 2008 07:35, Daniel Frey wrote:
On Sun, 2008-04-27 at 13:31 +0200, Daniel Frey wrote:
Here's the next patch, this time optimizing sp_deleter_wrapper. It
The patch was lacking a detail::, corrected version attached. Sorry.
It seems okay to me. Although, I should say the bit that touches _internal_get_deleter is starting to get into shared_ptr code that I don't really have anything to do with.
Committed. Peter, if you want _internal_less to go away, too - either do it yourself or just tell me... Regards, Daniel
participants (2)
-
Daniel Frey
-
Frank Mori Hess