You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2014/05/03 18:58:15 UTC

[jira] [Reopened] (THRIFT-2471) Make cpp.ref annotation language agnostic

     [ https://issues.apache.org/jira/browse/THRIFT-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier reopened THRIFT-2471:
---------------------------------


THRIFT-2421 Tree/Recursive struct support in thrift

I have this issue:
{noformat}
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src/thrift -I../../../lib/cpp/src -I/usr/include -Wall -g -O2 -std=c++11 -MT Recursive_types.lo -MD -MP -MF .deps/Recursive_types.Tpo -c gen-cpp/Recursive_types.cpp  -fPIC -DPIC -o .libs/Recursive_types.o
In file included from gen-cpp/Recursive_types.cpp:7:0:
gen-cpp/Recursive_types.h: In constructor 'RecList::RecList()':
gen-cpp/Recursive_types.h:92:34: error: no matching function for call to 'boost::shared_ptr<RecList>::shared_ptr(int)'
gen-cpp/Recursive_types.h:92:34: note: candidates are:
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
                 from ../../../lib/cpp/src/thrift/transport/TTransport.h:24,
                 from ../../../lib/cpp/src/thrift/protocol/TProtocol.h:23,
                 from gen-cpp/Recursive_types.h:12,
                 from gen-cpp/Recursive_types.cpp:7:
/usr/include/boost/smart_ptr/shared_ptr.hpp:362:5: note: template<class Y> boost::shared_ptr::shared_ptr(boost::shared_ptr<Y>&&, typename boost::detail::sp_enable_if_convertible<Y, T>::type)
/usr/include/boost/smart_ptr/shared_ptr.hpp:362:5: note:   template argument deduction/substitution failed:
In file included from gen-cpp/Recursive_types.cpp:7:0:
{noformat}

> Make cpp.ref annotation language agnostic
> -----------------------------------------
>
>                 Key: THRIFT-2471
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2471
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>            Reporter: Jens Geyer
>             Fix For: 0.9.2
>
>
> The proposal is to make the new {{cpp.ref}} annotation introduced with THRIFT-2421 language agnostic instead of a C++ specialty only. 
> The annotation changes inlined nested structs into pointers to structs. This behaviour is potentially relevant with all languages using value semantics for nested structs etc.



--
This message was sent by Atlassian JIRA
(v6.2#6252)