Revert "[c++20] Mark class type NTTPs as done and start defining the feature test...
authorRichard Smith <richard@metafoo.co.uk>
Mon, 1 Mar 2021 20:17:10 +0000 (12:17 -0800)
committerRichard Smith <richard@metafoo.co.uk>
Mon, 1 Mar 2021 20:53:35 +0000 (12:53 -0800)
Some of the parts of this work were reverted; stop defining the feature
test macro for now.

This reverts commit b4c63ef6dd90dba9af26a111c9a78b121c5284b1.

clang/lib/Frontend/InitPreprocessor.cpp
clang/test/Lexer/cxx-features.cpp

index d47ad1b..c64a912 100644 (file)
@@ -565,7 +565,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
     Builder.defineMacro("__cpp_aggregate_bases", "201603L");
     Builder.defineMacro("__cpp_structured_bindings", "201606L");
     Builder.defineMacro("__cpp_nontype_template_args",
-                        LangOpts.CPlusPlus20 ? "201911L" : "201411L");
+                        "201411L"); // (not latest)
     Builder.defineMacro("__cpp_fold_expressions", "201603L");
     Builder.defineMacro("__cpp_guaranteed_copy_elision", "201606L");
     Builder.defineMacro("__cpp_nontype_template_parameter_auto", "201606L");
index f57faed..2f46f35 100644 (file)
 #error "wrong value for __cpp_structured_bindings"
 #endif
 
-#if check(nontype_template_args, 0, 0, 0, 201411, 201911, 201911)
+#if check(nontype_template_args, 0, 0, 0, 201411, 201411, 201411)
+// FIXME: 201911 in C++20
 #error "wrong value for __cpp_nontype_template_args"
 #endif