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

Dave Watson commented on THRIFT-2471:
-------------------------------------

Facebook's current use cases do not contain any cycles, nor repeated nodes - 
internally our version uses unique_ptr, so the above wouldn't crash, but also 
wouldn't work, since you couldn't move the same unique_ptr twice.  

In the current implementation there are a lot of sharp edges around cycles / 
one node referenced twice - see also THRIFT-2005, THRIFT-2462.  We should 
probably come up with a reasonable strategy to fix all of these.  Shared_ptr 
would be an easy fix in this case, but you'd still end up serializing the leg 
twice

> 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
>
> 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)

Reply via email to