Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-09-03 07:29:49


From: "David Abrahams" <david.abrahams_at_[hidden]>
> From: "Peter Dimov" <pdimov_at_[hidden]>
> > There is a break-even point past which a custom smart pointer
constructed
> by
> > defining the appropriate policies becomes harder to write, more error
> prone,
> > less readable and less efficient compared to simply implementing the
class
> > from scratch. And coming up with a good policy-based design (one with a
> > reasonable break-even point) is difficult.
>
> I think we learned some things from the iterator adaptor library, which
> AFAICT has been a success. I'm not sure we can apply all of those lessons,
> but it may yet be possible. The first thing missing is a Pointer Concept
> family definition along the lines of the Iterator Concept family.

Leading C++ experts can't agree on a common informal definition of the term
"smart pointer" (the best they can think of is "anything that redefines *
and ->") and you think that we can devise a Pointer Concept? ;-)

Although my point was more along the lines that even given a policy-based
smart pointer, your particular case would most probably still call for an
old school, hand written implementation.

--
Peter Dimov
Multi Media Ltd.

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