[ 
https://issues.apache.org/jira/browse/THRIFT-2421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15134508#comment-15134508
 ] 

Daniel Wolf commented on THRIFT-2421:
-------------------------------------

It seems like this kind of recursion definition still does not work in c++:

{code}
struct A {
  1: optional A a;
}
{code}

{code}
struct A {
  1: optional B b;
}

struct B {
  1: optional A a;
}
{code}

For this to work, should the thrift c++ compile generate fields as pointers? 
The the forward declaration will work.

> Tree/Recursive struct support in thrift
> ---------------------------------------
>
>                 Key: THRIFT-2421
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2421
>             Project: Thrift
>          Issue Type: Sub-task
>          Components: C++ - Library
>            Reporter: Jake Farrell
>            Assignee: Jake Farrell
>             Fix For: 0.9.2
>
>         Attachments: 84.patch, tree_and_recursive_structs.thrift
>
>
> Patches to implement tree/list/co-recursive structures in thrift
> https://github.com/apache/thrift/pull/84



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to