|
Boost : |
Subject: Re: [boost] Define to test for deprecated std::auto_ptr
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-12-30 11:49:59
El 30/12/2014 a las 13:31, Fletcher, John P escribió:
> I have some tests which are throwing up std::auto_ptr as deprecated with C++11.
>
> Is there a define that can be tested for in user code so that I can switch to std::unique_ptr when it is available? Something like this:
>
> #ifdef BOOST_NO_CXX11_UNIQUEPTR
> // use auto_ptr
> #else
> // use unique_ptr
> #endif
Or you might want to use boost::movelib::unique_ptr for code to be
compiled in C++03 and C++11 modes:
http://www.boost.org/doc/libs/1_57_0/doc/html/boost/movelib/unique_ptr.html
Best,
Ion
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk