[
https://issues.apache.org/jira/browse/THRIFT-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036846#comment-16036846
]
Mike Gresens edited comment on THRIFT-2221 at 6/5/17 11:57 AM:
---------------------------------------------------------------
Mario,
may be <boost/scoped_ptr.hpp> is not includes but used later:
{code}
+ #if __cplusplus < 201103L
+ #include <boost/scoped_ptr.hpp>
+ #endif
{code}
and
{code}
+ #if __cplusplus >= 201103L && (defined(__clang__) || __cpp_alias_templates
>= 200704)
+ using scoped_ptr = std::unique_ptr;
+ #else
+ using ::boost::scoped_ptr;
{code}
Do the two #if's always match?!
# #if __cplusplus < 201103L
# #if __cplusplus >= 201103L && (defined(__clang__) || __cpp_alias_templates
>= 200704)
Mike...
was (Author: msg-72):
Mario,
may be <boost/scoped_ptr.hpp> is not includes but used later:
{code}
+ #if __cplusplus < 201103L
+ #include <boost/scoped_ptr.hpp>
+ #endif
{code}
and
{code}
+ #if __cplusplus >= 201103L && (defined(__clang__) || __cpp_alias_templates
>= 200704)
+ using scoped_ptr = std::unique_ptr;
+ #else
+ using ::boost::scoped_ptr;
{code}
Does the two #if's always match?!
# #if __cplusplus < 201103L
# #if __cplusplus >= 201103L && (defined(__clang__) || __cpp_alias_templates
>= 200704)
Mike...
> Generate c++ code with std::shared_ptr instead of boost::shared_ptr.
> --------------------------------------------------------------------
>
> Key: THRIFT-2221
> URL: https://issues.apache.org/jira/browse/THRIFT-2221
> Project: Thrift
> Issue Type: Improvement
> Components: C++ - Compiler
> Affects Versions: 0.9.1
> Environment: C++11 compilers with std::shared_ptr support
> Reporter: Chris Stylianou
> Assignee: James E. King, III
> Labels: c++11, compiler, thrift
>
> Most modern compilers now have full support for std::shared_ptr when enable
> with c++11 flags. It would be nice to have the option to generate code that
> uses this instead of boost::shared_ptr. This would enable us to remove
> another boost dependency, on the road to a dependency-free thrift library :)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)