[
https://issues.apache.org/jira/browse/IGNITE-3581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15967420#comment-15967420
]
Igor Sapego commented on IGNITE-3581:
-------------------------------------
[~ptupitsyn] well, yeah, it's common practice. In C++11 there are special enum
types for that - {{enum class}}, but previously it was ordinary achieved by
placing enums in separate namespaces or struct. I like structs more because you
can place them inside other classes and because of the naming consistency
(namespaces usually use snake_case). You can see details
[here|http://stackoverflow.com/questions/7090130/enum-in-a-namespace] for
example.
> CPP: Place different enums and constants in separate namespaces or structs.
> ---------------------------------------------------------------------------
>
> Key: IGNITE-3581
> URL: https://issues.apache.org/jira/browse/IGNITE-3581
> Project: Ignite
> Issue Type: Task
> Components: platforms
> Affects Versions: 1.6
> Reporter: Igor Sapego
> Assignee: Igor Sapego
> Labels: cpp
> Fix For: 2.0
>
>
> The common practice is to place enums and constants in separate namespaces or
> structs. This way we can group them and avoid name clashes without the need
> to use long names.
> [Details|http://stackoverflow.com/questions/7090130/enum-in-a-namespace].
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)