
26 Jun
2004
26 Jun
'04
7:36 a.m.
Daniel Wallin wrote:
I don't necessarily think this is a good idea,
Anyway, it's an idea :) It's just that it maybe could simplify 99% of the intrusive_ptr applications. I also played around with making the concept extendable (optionally forwarding the call again to 'external' intrusive_ptr_add_ref etc. after handling the reference count) but I couldn't imagine any situation where this would be useful.
You can use CRTP here instead, to avoid the virtual destructor.
Thanks! Stefan