Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2002-08-20 13:37:20


"Greg Colvin" <Gregory.Colvin_at_[hidden]> wrote:
> So here is a challenge: apply the tricks in maybe_semi_portable_ptr
> to reimplement boost::shared_ptr and boost::intrusive_ptr so that
> their size is just one pointer. It is OK if this implementation is
> not portable, since we already have a portable implementation. It is
> not OK to change their interface.

To add exception handlings: no problem. But to support add_ref() and
counted_base can become questionnable. Someone could help me draw the lines
if possible. I must admit I have to work on another application at the same
time... I cannot fully concentrate on ptr.hpp.

> And a common. As I recall, the first ptr<> in this thread was a very
> fast and simple wrapper for a pointer that tried to solve just one
> problem: insert, remove, and sort ptr objects in a container, and
> delete the pointed-to objects when the container is destroyed. No
> reference counting needed. That still seems like a useful goal that
> has been lost.

I rewrote the license of mutable_ptr.hpp for those interested. sort() is
working for lists but need to be tested for other containers.

Philippe A. Bouchard


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