id summary reporter owner description type status milestone component version severity resolution keywords cc 11672 Thread: Should use unique_ptr, not auto_ptr Ben Wiederhake viboes "Boost.Thread has two occurrences of `auto_ptr`, which is deprecated since C++11: {{{ $ grep -rn 'auto_ptr' include/boost/thread/detail/thread_group.hpp:78: std::auto_ptr new_thread(new thread(threadfunc)); src/win32/thread.cpp:156: std::auto_ptr< ThreadProxyData> data(reinterpret_cast< ThreadProxyData*>(args)); }}} This causes a warning when compiling with gcc-5.2, and soon other compilers as they become compliant with the clause ""std::auto_ptr is deprecated"". I can see the following ways to resolve the warning: - Literally silence the warning, like in #11622. I view this as a very bad idea. - Use `std::unique_ptr` if using C++11 or newer. I view this as a bad idea. - Use `boost::movelib::unique_ptr`. I view this as a good idea. I checked both occurrences of `auto_ptr` by hand, and found that in both cases, std::unique_ptr can be used just as well! (In both cases, `auto_ptr` is only used to guarantee a call to `delete` in case anything throws.)" Bugs closed Boost 1.60.0 thread Boost 1.59.0 Problem fixed auto_ptr