================
@@ -671,10 +671,8 @@ static void InitializeCPlusPlusFeatureTestMacros(const 
LangOptions &LangOpts,
                         LangOpts.CPlusPlus23   ? "202211L"
                         : LangOpts.CPlusPlus17 ? "201603L"
                                                : "200907");
-    Builder.defineMacro("__cpp_static_assert", LangOpts.CPlusPlus26 ? "202306L"
-                                               : LangOpts.CPlusPlus17
-                                                   ? "201411L"
-                                                   : "200410");
+    // C++17 / C++26 static_assert backported
+    Builder.defineMacro("__cpp_static_assert", "202306L");
----------------
AaronBallman wrote:

I'm not certain I agree that this is non-conforming, but the standard could be 
made more clear. The *name* of the feature test macro has to be predefined, but 
the standard says nothing about the value beyond what the value is for that 
particular release of the standard. The whole point to feature test macros is 
to be able to use the resulting date to tell you which feature you're working 
with, so not being able to specify an updated value for backported 
functionality... kind of defeats the purpose.

https://github.com/llvm/llvm-project/pull/102044
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to