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

Konrad Grochowski commented on THRIFT-3336:
-------------------------------------------

I personally quite like generation options, *but* I saw this discussion quite 
often on Jira or maillist and usually consensus was: "keep generation options 
at minimum, if really needed - use annotations". I do not think that generating 
operator<< in C++ is something that should go into annotations (present in IDL 
file). Option would probably be frown upon... 

As nobody before complained about it, and your solution should improve 
extendability (and I do see any potential new problems it could introduce) - 
I'd leave it for now as default and possibly return to discussion if somebody 
find some new issue - no need to do more work than necessary.

off-topic: probably providing thrift compiler with ability to read options from 
some file, or introducing some special format of "options per language in IDL 
file" (comments, top-level annotations, new grammar construct?) would solve a 
lot of such discussions...

> Thrift generated streaming operators added in 0.9.2 cannot be overridden
> ------------------------------------------------------------------------
>
>                 Key: THRIFT-3336
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3336
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Compiler
>    Affects Versions: 0.9.2, 0.9.3
>            Reporter: James E. King, III
>            Assignee: James E. King, III
>
> I work on one project that has been using thrift-0.8.0 and I am updating it 
> to 0.9.3.  The project defines streaming operators for "operator <<" on a 
> variety of thrift-generated types.
> The fix added in THRIFT-2067 provides similar but not identical functionality 
> however it was done in a way that cannot be overridden, and this causes 
> projects upgrading from versions prior to 0.9.2 with their own streaming 
> operators to fail to compile.
> One way to make the streaming operator virtual is to follow the example 
> provided in 
> http://stackoverflow.com/questions/5189614/operator-and-inheritance



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

Reply via email to