Boost logo

Boost :

From: Mulligan, Pat (Pat_Mulligan_at_[hidden])
Date: 2000-05-30 19:34:50

Can I see your implemtnation? I have been invited to write an article of
one of the rags on smart pointers to stl containers. In general, my opinion
is in the KISS camp on this, but if you have the cat in the bag, I'll gladly
utilize it.

I am looking at the shared_ptr and related code now to understand it (and
possibly offer any suggestions based on what the editor and I agreed to be
the focus of a smart pointer may/should be, which are just our opinions).

If used as is, all copywrites will be observed and permission will be
obtained from the authors prior, and the appropriate kudos given.


-----Original Message-----
From: Andrei Alexandrescu [mailto:andrewalex_at_[hidden]]
Sent: Tuesday, May 30, 2000 8:11 PM
To: boost_at_[hidden]
Subject: [boost] Re: Hello boosters

--- In boost_at_[hidden], "Milutin Jovanovic" <miki_at_o...> wrote:
> Hmm, I have never faced the need for 15, let alone 20 different
> pointers. If the number is this high in some projects, then I
agree, the
> appeal of separate implementations fades rather quickly.

Yes, 15 pointers in the same project might be the case only for
really large ones.

My point, however, is a bit different: if you need to develop a new
smart pointer from scratch just because you need an assert before
dereferencing and your smart pointer library doesn't do it, that's
not good.

So a library that indeed aims at providing useful smart pointer
classes should provide a lot of flexibility, in addition to providing
pre-canned implementations of the most common cases. But you never
can predict all the cases - special allocators, custom exceptions,
you name it.

SmartPtr makes a big effort not to let developers down when they have
to implement a smart pointer that **only slightly** particular, as it
most often happens. "I want a smart pointer that throws a
PointerException if you dereference the null pointer!" The smart
pointers of today offer only closed behavior, or a collection of
closed behaviors. With SmartPtr you can intervene and change many
aspects of it, while relying on the tried and true defaults in other
aspects. You don't have to cope with all the issues at once.


Failed tests, classes skipped, forgotten locker combinations.
Remember the good 'ol days

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