Repository navigation
: Fix preprocessor logic - #2615
Stephan T. Lavavej (StephanTLavavej) merged 5 commits into
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_PREPROCESSORto_STL_INTERNAL_STATIC_ASSERT(_STL_COMPILER_PREPROCESSOR);