thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Reynolds <>
Subject Self referential classes
Date Mon, 26 Jan 2015 15:05:21 GMT
Looking at the archives:

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;

- Stuart

View raw message