Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-04-19 16:58:02

"Fernando Cacciola" <fcacciola_at_[hidden]> wrote in message
> [...]
> So, I'm starting to think that Dietmar is right about having only
> shared_ptr<> (instead of both shared_ptr<> and intrusive_ptr<>).

The advantage of a separate intrusive_ptr<> is that you can use
whatever type of conforming count you like, whether that be deriving
from a counted_base or including the count directly. So, for instance,
I can create my own base class that does not support weak pointers,
if I don't want to pay for weak_ptr support. On the other hand, it
would then not be interoperable with shared_ptr. I don't particularly
like having to pay for weak_ptr support now (weak_ptr policy, anyone?),
but I guess if I must with shared_ptr anyway, a unified interface might
be better.


Boost list run by bdawes at, gregod at, cpdaniel at, john at