On Tue, Aug 11, 2020 at 6:52 AM Stefan Seefeld via Boost < boost@lists.boost.org> wrote:
Hi all,
On 2020-08-11 9:41 a.m., Jeff Garland via Boost wrote:
My compile report the RC:
Does boost have a mechanism (compilation flags, auto-defined macro, etc.) to mask `std::auto_ptr` usage ?
Note that the situation isn't quite as simple as replacing library-internal use of `std::auto_ptr`. For example, in case of Boost.Python we also need to specialize templates so users can continue using `std::auto_ptr` in their own code, unless they explicitly (using macros) or implicitly (using modern compilers) disable such backward-compatible support. I suppose there are other Boost libraries in a similar situation.
Here's a sample of the warnings -- looks to me like the python case all the warnings come from detail - so for modes past c++11 I'd think unique_ptr could be used. A macro for python could allow users to override the removal and use auto_ptr in their code if they choose. And this problem is isolated to python and locale. ./boost/locale/localization_backend.hpp:116:59: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] ./boost/locale/util.hpp:180:28: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] ./boost/python/detail/is_auto_ptr.hpp:17:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] ./boost/python/detail/is_auto_ptr.hpp:17:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] Jeff