Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-05-03 14:31:24

"David B. Held" <dheld_at_[hidden]> wrote in message

My answers to the questions below are biased, but I said I'd encourage you
by reinforcing some things.

> 1. Is a policy-based smart pointer still worth pursuing, or are there too
> many
> contentious issues that will never get resolved?

My feeling is that there is an increasing awareness and positive attitude
towards having a policy-based smart pointer in boost and in the standard.

> 2. If a policy-based smart pointer *is* worth pursuing, is
> boost::loki::smart_ptr
> heading in the right direction? Is there a better candidate? Are there
> specific
> changes that could be made that would make it better?

I personally believe you are doing a terrific work, and I'm not saying that
just to wax you :o). I haven't seen a better candidate to date. Gennadyi's
proposed changes that haven't been incorporated yet are all sensible, but
sometimes I don't have time to review them in detail. I count on other
participants to contribute to that.

> 3. Which is best for Boost, and which is best for a library proposal?
> A) just shared_ptr
> B) just smart_ptr
> C) shared_ptr + smart_ptr
> D) other

I believe that for boost, C would be a sensible choice for backwards
compatibility reasons. Boost might recommend using ptr<T>::shared instead of
shared_ptr<T> for new code.

For the standard, I believe that a single policy-based pointer would
suffice, and might also deprecate auto_ptr. Defaults and template typedefs
(or simulated template typedefs) will provide a number of commonly-used
designs, including shared_ptr.


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