-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
No Compiler warning for missing case in Switch statement #49
Comments
That's not good! I'm not immediately ready to reproduce this, but thanks for including the project. I'll have to look at it after some delay :/ |
That is fine. Please let me know if you need any more info. |
For some reason, the warning is off by default, see here. You need to add something like |
It seems that this can only be done by the user, so the code proper of Better Enums doesn't need to be modified. However, we should probably document enabling this warning, perhaps by adding a short sentence and the link given by @JaapAap, to the tutorial and/or reference. |
Yes, please document this issue. I spent 15 minutes trying to get this to fail, then I was about to complain about it and apparently it's a known issue! Imho either change the introduction page to mention that it needs enabling for all those people who are sadly on Visual Studio compilers, or remove the mentioning of the feature. Same for the tutorial page on the switch. |
Enabling that feature is not always an option either, just FYI. Our project uses shared Libs and public headers and when I enabled the feature I also got warning related to Libs and headers that was not ours to begin with. I have picked up a work item to go take a look at how difficult it would be to fix all of them but I suspect it will be a time consuming effort. |
Thanks for pinging. I updated the README and the |
That's great, thanks Aantron. It's indeed enough. |
Copy pasting the SafeSwitch example to project created via Visual Studio 2017 and compiling the project, no warning is being produced by the compiler.
Compiler Version:
Sample project:
BetterEnumTest.zip
The text was updated successfully, but these errors were encountered: