Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2002-05-03 15:40:43


----- Original Message -----
From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
Newsgroups: gmane.comp.lib.boost.devel
To: <boost_at_[hidden]>
Sent: Friday, May 03, 2002 4:49 PM
Subject: [boost] Re: Smart pointer poll

> "Fernando Cacciola" <fcacciola_at_[hidden]> wrote in message
> news:011101c1f2d9$ba006e60$0f00a8c0_at_fernandoc...
> [snip]
> > The bottom line is that I don't think that a policy-based design, which
> > gives maximum flexibility, should imply that well-though packages
> shouldn't
> > also be provided.
>
> I'd like to ask you a question - do you see the inner typedef solution
> "ptr<T>::some_impl" acceptable for these well-thought-ouy packages?
>
>
90% :-)

It worries me the lookup problem pointed out by Peter Dimov:
Given

ptr<x>::y

'x' can't be deduced as a template parameter to instantiate a template
function of the form:

template<class T> void f ( typename ptr<T>::y );

Straight public derivation is more cumbersome from the library
implementators, but it is easier for the user:

template<class T>
class shared_ptr : public smart_ptr<T,A,B,C,D>
{
  // fwding ctors here.
} ;

Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com


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