You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Alexander Shigin (JIRA)" <ji...@apache.org> on 2009/04/04 13:41:13 UTC

[jira] Updated: (THRIFT-72) C++ structure constructor

     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Shigin updated THRIFT-72:
-----------------------------------

    Attachment: thrift-cpp-constructor-v2.patch

The first version makes gcc complain about initialization order. The new patch solves the problem.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch, thrift-cpp-constructor-v2.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.