Closed D4koon closed 5 years ago
Thanks!
For the patch itself, I would expect this to break Better Enums on all compilers, in particular it should make it impossible to declare Better Enums with = foo
syntax, like
BETTER_ENUM(Something, int, A, B = 2)
The = 2
should cause a syntax error in the expansion of the macro, if this patch is applied.
See this article for an explanation of what the macro that the patch editing is doing, in section "Values array."
With the extra cast it seems to also work with vs17
Thanks, it looks good now :)
Consider this PR accepted :) I want to see if I can find time in the next week or two to update the CI to use modern compilers, then merge this, so it's actually being tested on VS 2017. If I don't have time, I'll merge without updating the CI. So please don't mind the delay :)
Thanks!
I added VS2017 to AppVeyor testing, and ran this PR on it (https://github.com/aantron/better-enums/commit/2d2a6a56481ebe7817b8cadce05ea9d28dee7764).
Fix for #53 (VS 2017 error) expression must have a constant value