Skip to content

Commit 564f5b0

Browse files
committed
Revert "[c++20] Mark class type NTTPs as done and start defining the feature test macro."
Some of the parts of this work were reverted; stop defining the feature test macro for now. This reverts commit b4c63ef.
1 parent 0658fc6 commit 564f5b0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
565565
Builder.defineMacro("__cpp_aggregate_bases", "201603L");
566566
Builder.defineMacro("__cpp_structured_bindings", "201606L");
567567
Builder.defineMacro("__cpp_nontype_template_args",
568-
LangOpts.CPlusPlus20 ? "201911L" : "201411L");
568+
"201411L"); // (not latest)
569569
Builder.defineMacro("__cpp_fold_expressions", "201603L");
570570
Builder.defineMacro("__cpp_guaranteed_copy_elision", "201606L");
571571
Builder.defineMacro("__cpp_nontype_template_parameter_auto", "201606L");

clang/test/Lexer/cxx-features.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@
181181
#error "wrong value for __cpp_structured_bindings"
182182
#endif
183183

184-
#if check(nontype_template_args, 0, 0, 0, 201411, 201911, 201911)
184+
#if check(nontype_template_args, 0, 0, 0, 201411, 201411, 201411)
185+
// FIXME: 201911 in C++20
185186
#error "wrong value for __cpp_nontype_template_args"
186187
#endif
187188

0 commit comments

Comments
 (0)