-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enum classes #39510
Enum classes #39510
Conversation
It would be good to remove the (now-unnecessary) common prefix from the enumerator names. If you don't want to do that by hand, then I had a plan to implement a clang-tidy check to do it at some point. |
I introduce a new enumeration in #39387 should I convert it to an enum class as well? |
Yes, I want to discuss with everyone, but I think this would be a good
thing to make mandatory.
…On Sun, Apr 12, 2020, 7:19 PM anothersimulacrum ***@***.***> wrote:
I introduce a new enumeration in #39387
<#39387> should I
convert it to an enum class as well?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#39510 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGSA5D5NZQ34YJMUNWMKBLRMJZCJANCNFSM4MGSYFTQ>
.
|
Yes, it should not be any harder to use than plain enums in most cases.
I was thinking about renaming them too. Will do. |
Agreed, I think it should be the default to do so, unless some unusual situation dictates otherwise. Certainly for enums at global scope. |
2e73efc
to
7079e3b
Compare
…ule a class enums
7079e3b
to
d693fc4
Compare
d693fc4
to
61f0bbb
Compare
Merge pull request CleverRaven#39510 from ZhilkinSerg/enum-classes-20…
Summary
SUMMARY: None
Purpose of change
Add class to some enums (rename enum class members in the process, to remove prefixes)
Describe alternatives you've considered
Leave enums alone in a classless society.
Testing
Let it compile.