-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
<stdatomic.h>: Fix preprocessor logic #2615
<stdatomic.h>: Fix preprocessor logic #2615
Conversation
Relabeling - I don't think that this was a bug, strictly speaking, as for non-compiler tools we'd skip the C check, include yvals.h (which would skip its contents), and then skip the rest of the file - which should work (if my vague understanding of the non-compiler tools is correct). I do believe that simply skipping the whole thing is an improvement. |
Good point, the comment was confusing though and it caused me to write my own bug when modifying the header, so I would also say it's an improvement |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for simplifying this code! ✨ 😸 ✅ |
Because this header needs to work in C and C++, we needed to move the check for a non-broken preprocessor outside of yvals_core, but we didn't actually skip the whole header if it failed!
This PR fixes that. In addition, it:
#if _STL_COMPILER_PREPROCESSOR
to_STL_INTERNAL_STATIC_ASSERT(_STL_COMPILER_PREPROCESSOR);