Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-06-24 02:28:15


Peter Dimov wrote:
>
> From: "Markus Schöpflin" <markus.schoepflin_at_[hidden]>
> > Hello all,
> >
> > I have a problem with MSVC6 and shared_ptr. The compiler
> > is hopelessly confused by the template constructor:
> >
> > template<typename Y> explicit shared_ptr(Y * p)
> >
> > As a result, it fails to compile:
> >
> > boost::shared_ptr<int> p(0);
>
> This is as it should be. Either use the default constructor, or cast the
> zero to the correct pointer type.
>

Ok, thanks for the clarification. Is there anywhere some design
rationale besides the FAQ where I can look up what should work
and what not and why it works the way it does?

For me this behaviour is kind of surprising as auto_ptr does
have such a constructor.

Markus


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