better-enums
better-enums copied to clipboard
Member '_value' was not initialized in this constructor
Hello, Have a simple better_enum:
BETTER_ENUM(state_t,
uint8_t,
off = 0, //
on = 1 //
);
My compiler (arm-none-eabi-c++) gives a warning (using -std=gnu++14):
Member '_value' was not initialized in this constructor
What could be the issue?
Thanks!
Is that the full error message? I can't tell if your compiler is gcc or clang (or something else — you did not specify). But all the recent compilers I have used give much more detailed error messages than just the one line you've shown, in most circumstances.
If that's all that is shown, try passing -E to your compiler to get the preprocessed code, and then try to compile that. It should give you a more precise message.