Boost logo

Boost :

Subject: Re: [boost] Boost and auto_ptr (was Boost 1.60.0 beta 1...)
From: Zach Laine (whatwasthataddress_at_[hidden])
Date: 2015-11-10 11:03:20


On Tue, Nov 10, 2015 at 8:47 AM, Artyom Beilis <artyomtnk_at_[hidden]> wrote:
>
> I don't see ANY reason whatsoever to break existing code unless the
> use of some code opens some critical security bugs like gets() for
> example.
>
> Telling the entire C++ community you don't have X any more because
> you have Y which is better and break millions lines of code
> just because.
>
> I think this proposal is totally disconnected from real world.
>
> I'd recommend anybody who actually has access to standard committee
> scrap this proposal and kill it without mercy.
>
> There is no reason to break unbroken code.

There's a bit more to it than "now we have unique_ptr":

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20.4.5%20-%20Class%20template%20auto_ptr

>From above:

"auto_ptr moves from lvalues using copy syntax and is thus fundamentally
unsafe."

I agree with the author of that paper that the use of auto_ptr *is* broken
in the general case, and so it should be deprecated and removed.

Zach


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