From 1b6fa43c52b24850533d23db2eef27f8118b6a66 Mon Sep 17 00:00:00 2001 From: Charlie Barto Date: Mon, 28 Mar 2022 16:50:07 -0700 Subject: [PATCH] : Simplify preprocessor logic (#2615) --- stl/inc/stdatomic.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/stl/inc/stdatomic.h b/stl/inc/stdatomic.h index a5566f0ebd..85ca6c4ce7 100644 --- a/stl/inc/stdatomic.h +++ b/stl/inc/stdatomic.h @@ -7,17 +7,15 @@ #ifndef _STDATOMIC_H_ #define _STDATOMIC_H_ -#if defined(RC_INVOKED) || defined(Q_MOC_RUN) || defined(__midl) -// do nothing, see _STL_COMPILER_PREPROCESSOR in yvals_core.h -#else // ^^^ non-compiler tools / C and C++ compilers vvv +// see _STL_COMPILER_PREPROCESSOR in yvals_core.h +#if !defined(RC_INVOKED) && !defined(Q_MOC_RUN) && !defined(__midl) + // provide a specific error message for C compilers, before the general error message in yvals_core.h #ifndef __cplusplus #error is not yet supported when compiling as C, but this is planned for a future release. #endif // __cplusplus -#endif // ^^^ C and C++ compilers ^^^ #include -#if _STL_COMPILER_PREPROCESSOR #ifdef _M_CEE_PURE #error is not supported when compiling with /clr:pure. @@ -135,5 +133,5 @@ _STL_RESTORE_CLANG_WARNINGS #pragma pack(pop) #endif // ^^^ _HAS_CXX23 ^^^ -#endif // _STL_COMPILER_PREPROCESSOR +#endif // !defined(RC_INVOKED) && !defined(Q_MOC_RUN) && !defined(__midl) #endif // _STDATOMIC_H_