Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2001-04-04 09:07:57


> -----Original Message-----
> From: Peter Dimov [mailto:pdimov_at_[hidden]]
>
> From: "David Abrahams" <abrahams_at_[hidden]>
>
> > From: "Beman Dawes" <bdawes_at_[hidden]>
>
> > > The downside is that it will break some existing code,
> although the fix
> is
> > > trivial. But it does increase safety, so is worth doing.
> Where does
> that
> > > leave std::auto_ptr<>? Odd man out, as usual, I guess.
> >
> > Just missing a simple trick that nobody thought to apply.
> Maybe we could
> > propose this as an upgrade in the next version of C++.
>
> Tricks don't go in the standard. :-) You need "instantiating
> auto_ptr<T>::~auto_ptr, where T is an incomplete type other
> than void, is
> ill-formed, no diagnostic required." Can this pass as a DR?
> No, don't look
> at me.

I think it's already in there, actually, or close enough: [17.4.3.6/2] (as I
read it) would make instantiating std::auto_ptr with an incomplete type
undefined behaviour.

        -Steve


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