-
Notifications
You must be signed in to change notification settings - Fork 355
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
Casting out-of-range int to enum (class) is UB #69
Comments
Any ideas on a fix? |
That can't be easily fixed without removal of casting num to enum. I've removed this functionality in my local project and made hard requirement on |
Do you have a PR or a diff of the changes? That sounds reasonable. Edit: I see what you mean; this was rewritten by a PR; |
Let me know if that didn't fix it! |
Undefined behavior or undefined value, actually. Is it really a good idea to allow parsing to enums by simply casting integers?
The text was updated successfully, but these errors were encountered: