Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Member '_value' was not initialized in this constructor #97

Open
vervaekejonathan opened this issue Feb 5, 2021 · 1 comment
Open

Comments

@vervaekejonathan
Copy link

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!

@aantron
Copy link
Owner

aantron commented Feb 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants