Skip to content
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

converted all flag enums into constexpr uints #2995

Conversation

mkalte666
Copy link

follow up on #2993 (comment)

@rokups
Copy link
Contributor

rokups commented Jan 22, 2020

This change prevents compiler from ensuring that we do not mix incompatible flags at build time. A more proper solution would be to define bitwise operators for enums in question to enable using them as flags.

@mkalte666
Copy link
Author

I did not consider that but you are right. Oops.

@mkalte666 mkalte666 closed this Jan 22, 2020
@ocornut
Copy link
Owner

ocornut commented Jan 22, 2020 via email

@mkalte666
Copy link
Author

Is there a way to introduce type safety for flags while still allowing for this convenience without significant overhead?

I cannot think of anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants