thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henrique Mendonça <hmendo...@gmail.com>
Subject Re: Self referential classes
Date Mon, 26 Jan 2015 22:49:34 GMT
Hi Stuart,

That should work, are you having any problems? Please have a look on:
https://issues.apache.org/jira/browse/THRIFT-2421
and:
https://issues.apache.org/jira/browse/THRIFT-2471

both already on 0.9.2

Cheers,
Henrique


On 27 January 2015 at 02:05, Stuart Reynolds <stu@stureynolds.com> wrote:

> Looking at the archives:
>
> http://mail-archives.apache.org/mod_mbox/thrift-user/201011.mbox/%3CAANLkTi=JFbUR1W94dpw3ZPXH=LhE_AVcNDRc_DK=UG_=@mail.gmail.com%3E
>
> I understand that the following causes problems for C++:
>
> struct A {
>   1: A a;
> }
>
> because sizeof(A)==infinity.
>
>
> 1-- the above .thrift compiles for in thrift 0.9.2. Are there guards
> against it in later versions of thrift? If so, can there any
> configuration possible surround this? (for example, ignoring the error
> because C++ it not a target, or changing the C++ output to use aptr
> for field members).
>
> 2 -- Are self referencing collections generally allowed? (Can't test
> locally -- for now stuck with 0.9.2) e.g. :
>
> struct A {
>   1: list<A> children;
> }
>
>
> Thanks,
> - Stuart
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message