better-enums icon indicating copy to clipboard operation
better-enums copied to clipboard

Non-Constant Expressions in Clang9

Open Khaled431 opened this issue 5 years ago • 2 comments

As the title states, better_enum is throwing errors in switch cases now. error: case value is not a constant expression

Khaled431 avatar Nov 09 '20 20:11 Khaled431

Can you give a small example of a program that fails, show the message, and give the version or commit hash of the enum.h you are using?

aantron avatar Nov 13 '20 16:11 aantron

It's the latest version of the enum.h file (68ca02d1f5b369dc0e2560394358db7ffb4f84b7) and the use case is during a switch statement. The code can be recreated by just creating a better_enums enum and then creating a switch statement that uses a field of type enum.

Khaled431 avatar Nov 13 '20 20:11 Khaled431