[ https://issues.apache.org/jira/browse/THRIFT-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036097#comment-16036097 ]
Mario Emmenlauer commented on THRIFT-2221: ------------------------------------------ Thanks [~msg-72]! This is the key. When I change {code} + #if __cplusplus >= 201103L && (defined(__clang__) || __cpp_alias_templates >= 200704) + using scoped_ptr = std::unique_ptr; + #else {code} to {code} + #if __cplusplus >= 201103L && (defined(__clang__) || __cpp_alias_templates >= 200704) + template <typename T> using scoped_ptr = std::unique_ptr<T>; + #else {code} it builds fine! I'm very curious to test the C++11 pointers, thanks! Can't wait for the rest of the C++11 code cleanup... > 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)