[
https://issues.apache.org/jira/browse/THRIFT-3622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15859551#comment-15859551
]
James E. King, III edited comment on THRIFT-3622 at 2/9/17 2:11 PM:
--------------------------------------------------------------------
The easiest fix is to modify the code to include {{<boost/unique_ptr.hpp>}} and
use a {{boost::unique_ptr}} in place of a {{std::auto_ptr}}. If the pointer
never needs to be released and used raw (like passing to a third party C
library), a boost::scoped_ptr is a simpler wrapper which guarantees destruction
when falling out of scope.
This matches the rest of our current code (using boost concepts).
was (Author: jking3):
The easiest fix is to modify the code to include {{<boost/scoped_ptr.hpp>}} and
use a {{boost::scoped_ptr}} in place of a {{std::auto_ptr}}.
This matches the rest of our current code.
> Fix deprecated uses of std::auto_ptr
> ------------------------------------
>
> Key: THRIFT-3622
> URL: https://issues.apache.org/jira/browse/THRIFT-3622
> Project: Thrift
> Issue Type: Task
> Components: C++ - Library
> Reporter: John Sirois
> Assignee: James E. King, III
>
> We have some in lib/cpp, like so:
> {noformat}
> JSONProtoTest.cpp:35:13: warning: ‘template<class> class std::auto_ptr’ is
> deprecated [-Wdeprecated-declarations]
> static std::auto_ptr<OneOfEach> ooe;
> ^
> In file included from /usr/include/c++/5.3.0/bits/locale_conv.h:41:0,
> from /usr/include/c++/5.3.0/locale:43,
> from /usr/include/c++/5.3.0/iomanip:43,
> from JSONProtoTest.cpp:22:
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)