Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-07-17 14:39:07


"Philippe A. Bouchard" <philippeb_at_[hidden]> wrote in message
news:ah4a3q$aj8$1_at_main.gmane.org...
> [...]
> Well we don't really need a profile if we can simply calculate it:
> O(mutable_ptr(add(), remove(), swap()) * n) < O(shared_ptr(add(),
remove(),
> swap()) * n)
>
> If you're program is well designed and properly use a combinaison of
> mutable_ptr<> and * you will outstand shared_ptr<>.

After thinking about it a little, I'm convinced that squad_ptr is
essentially
the same as boost::intrusive_ptr, with the special case that the count
wrapper is part of the pointer class, whereas, intrusive_ptr does not
presume to force a particular embedded count. That is, one could
trivially implement squad_ptr in terms of boost::intrusive_ptr with all
the attendant benefits simply by pulling element_type out, and defining
an appropriate intrusive_add_ref() (or whatever it is called). So yes,
you may be able to beat boost::shared_ptr<>, but that's comparing
apples to oranges.

Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk