This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Benjamin Kosnik:

Do we really need to warn about auto_ptr<>?

Is it in Annex D in C++0x? If so, then yes. Why would it be treated differently than anything else?

One alternative that hasn't been mentioned is to "fix" it instead of deprecating it wholesale:


template<class T> class auto_ptr
{
public:

   auto_ptr( auto_ptr && r );
   auto_ptr( auto_ptr & r ) __attribute__( deprecated );
};

The idea is to keep code that uses it as if it were an unique_ptr warning-free. I don't know how practical this would be, though.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]