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

Member '_value' was not initialized in this constructor

Open vervaekejonathan opened this issue 4 years ago • 1 comments

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!

vervaekejonathan avatar Feb 05 '21 09:02 vervaekejonathan

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.

aantron avatar Feb 05 '21 13:02 aantron