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

ASF GitHub Bot commented on THRIFT-3382:
----------------------------------------

Github user hcorg commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/653#discussion_r42043446
  
    --- Diff: compiler/cpp/src/generate/t_cpp_generator.cc ---
    @@ -116,7 +116,8 @@ class t_cpp_generator : public t_oop_generator {
                                        bool read = true,
                                        bool write = true,
                                        bool swap = false,
    -                                   bool stream = false);
    +                                   bool stream = false,
    +                                   bool is_struct = false);
    --- End diff --
    
    is this necessary? it's either struct or exception, and there is already 
bool for that. or am I missing something? IMHO there is too many of those bools 
already :)


> TBase class for C++ Library
> ---------------------------
>
>                 Key: THRIFT-3382
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3382
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Compiler, C++ - Library
>    Affects Versions: 0.9.3
>            Reporter: Adam Beberg
>            Assignee: Adam Beberg
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Unlike Other languages, C++ is missing a TBase class (the majority of other 
> langugaes call it that) that all generated structs always inherit from. This 
> prevents simple utility functions, and forces ugly template use.
> Something like this:
> {code:title=thtift/TBase.h}
> class TBase {
> public:
>   virtual ~TBase();
>   virtual uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
>   virtual uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
> }
> {code}



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

Reply via email to