aantron / better-enums

C++ compile-time enum to string, iteration, in a single header file

Home Page:http://aantron.github.io/better-enums

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non-Constant Expressions in Clang9

Khaled431 opened this issue · comments

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

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?

It's the latest version of the enum.h file (68ca02d) 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.