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

ASF GitHub Bot commented on AVRO-1940:
--------------------------------------

GitHub user moriarty opened a pull request:

    https://github.com/apache/avro/pull/146

    AVRO-1940: C++: scope enums into own namespaces

    Adds option to add namespace around all enums with the same name as the 
enum.
    https://issues.apache.org/jira/browse/AVRO-1940
    
    There are otherways to do this (c++11) but this way introduces less changes 
and doesn't break anything.
    
    Originally this was PR #145 but I have cherry-picked and cleaned up the 
commit on top of master instead of on top of PR #142 to make it easier to 
review. This code passes the original tests, but doesn't add any additional 
tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/moriarty/avro 
avro-1940/cpp-namespace-scoped-enums/dev

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/avro/pull/146.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #146
    
----

----


> avrogencpp, scoped enums or c++11 enum class
> --------------------------------------------
>
>                 Key: AVRO-1940
>                 URL: https://issues.apache.org/jira/browse/AVRO-1940
>             Project: Avro
>          Issue Type: Improvement
>          Components: c++
>            Reporter: Alexander Moriarty
>
> It would be nice if avrogencpp could generated scoped enums.
> Either with C++11 enum class or just adding an additional namespace.
> This sort of relates to the issue I opened a few days ago: #AVRO-1936 in that 
> one way this has been gotten around in the existing AvrogencppTests.cc is by 
> generating one namespace per schema.
> This of course could be a breaking change depending how it is implemented.



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

Reply via email to