[v3] annex D 8 and 9 for C++0x

Jonathan Wakely jwakely.gcc@gmail.com
Fri Oct 26 19:02:00 GMT 2007


On 26 Oct 2007 13:36:11 -0500, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
>
> Do we really need to warn about auto_ptr<>?

That's the one part of the plan that bothers me too.  I have lots of
code using auto_ptr in perfectly correct ways, frequently in public
interfaces.  I'll move to using C++0x, but don't want to have to
re-write a lot of code to use unique_ptr when auto_ptr works OK.  If I
use -Wno-deprecated to silence warnings about auto_ptr then I don't
get warnings if someone sneaks an ostrstream into the codebase.

I'm concerned that there's no easy transition.  I can't use
std::unique_ptr in c++98 mode, and can't use template aliases for
std::tr1::unique_ptr there either, and I can't use std::auto_ptr in
c++0x mode without disabling the warnings.

But since my objections to deprecating auto_ptr didn't sway my
national body and it's going to Annex D, I guess it's right for
libstdc++ to warn about auto_ptr.

Jon



More information about the Libstdc++ mailing list