Boost logo

Boost :

Subject: Re: [boost] [C++ committee] auto_ptr removal in C++17 - request to comittie
From: Klemens Morgenstern (klemens.morgenstern_at_[hidden])
Date: 2017-08-07 06:29:08


Am 07.08.2017 um 07:32 schrieb Artyom Beilis via Boost:
> Hello,
>
> If somebody on committee is on this list. I really want to do
> something to prevent auto_ptr removal.
Even if, wrong list. Go to the standard mailing lists. Also it's already
approved, so you're way too late.
> It is exceptionally useful smart pointer in C++2003 and it is needed
> by the code that needs to be compatible for both 2003 and 2017.
You can use boost::shared_ptr prior to C++11.

>
> It is needed by libraries that aim to be compatible with C++2003.
> In the real world there is a huge codebase that uses C++2003 why to
> break something that works - especially since it works quite well. It
> isn't "gets" that can't be used securely.
It's not the hard:

#if __cplusplus <= 199711L
std::auto_ptr<foo> thiny;
#else
std::shared_ptr<foo> thingy;
#endif
>
> C++ committee please stop breaking existing code even if
> std::unique_ptr much better it does not exist in C++2003.
Then do not use C++17, simple as that. If you want full C++98
compatibility, use C++98.
>
> Artyom
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


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