On 05/20/17 19:29, Daniela Engert via Boost wrote:
Am 20.05.2017 um 18:16 schrieb Andrey Semashev via Boost:
On 05/20/17 18:45, Daniela Engert via Boost wrote:
Am 20.05.2017 um 17:28 schrieb Andrey Semashev via Boost:
... Personally, I would prefer libraries to switch to boost::unique_ptr and leave std::auto_ptr interfaces available (but deprecated) for backward compatibility. why not just going straight to std::unique_ptr?
Because you would lose compatibility with C++03, which I presume the authors of the libraries want to keep.
But you are proposing to keep the auto_ptr-based interface for that purpose, too.
I'm proposing to keep it for backward compatibility, deprecated, with the intention to remove it at some point. The up-to-date interface would use boost::unique_ptr, for C++03 and C++11 and so on.
I don't see the benefit of two solutions for the same problems sitting side-by-side. Users who want to stick with std::auto_ptr just keep on using the current interface, and users who need to get rid of std::auto_ptr in all of their code have to find a solution for their entire code base how to deal with that. Insisting on yet another non-standard option to interface with Boost is not necessarily what these people have in mind, imho.
I don't see another option if one (a Boost library developer or a Boost user) wants to keep his code stable across all C++ versions. If the standard library is not portable across different C++ versions (it is not) then you either lock yourself to particular C++ versions or simply do not use the standard library.