[c++20] Mark class type NTTPs as done and start defining the feature test macro.
authorRichard Smith <richard@metafoo.co.uk>
Fri, 18 Dec 2020 21:10:05 +0000 (13:10 -0800)
committerRichard Smith <richard@metafoo.co.uk>
Fri, 18 Dec 2020 21:42:23 +0000 (13:42 -0800)
clang/lib/Frontend/InitPreprocessor.cpp
clang/test/Lexer/cxx-features.cpp
clang/www/cxx_status.html

index f2c8d0f..d4b77a6 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",
-                        "201411L"); // (not latest)
+                        LangOpts.CPlusPlus20 ? "201911L" : "201411L");
     Builder.defineMacro("__cpp_fold_expressions", "201603L");
     Builder.defineMacro("__cpp_guaranteed_copy_elision", "201606L");
     Builder.defineMacro("__cpp_nontype_template_parameter_auto", "201606L");
index 8b9cb54..afc3b56 100644 (file)
 #error "wrong value for __cpp_structured_bindings"
 #endif
 
-#if check(nontype_template_args, 0, 0, 0, 201411, 201411)
+#if check(nontype_template_args, 0, 0, 0, 201411, 201911)
 #error "wrong value for __cpp_nontype_template_args"
 #endif
 
index 4a66b7f..923b13d 100755 (executable)
@@ -1005,7 +1005,7 @@ ISO C++ 2020 Draft International Standard.
     <tr>
       <td rowspan="2">Class types as non-type template parameters</td>
       <td><a href="https://wg21.link/p0732r2">P0732R2</a></td>
-      <td rowspan="2" class="none" align="center">No</td>
+      <td rowspan="2" class="svn" align="center">Clang 12</td>
     </tr>
       <tr> <!-- from Belfast -->
         <td><a href="https://wg21.link/p1907r1">P1907R1</a></td>