Skip to content

Commit b4c63ef

Browse files
committed
[c++20] Mark class type NTTPs as done and start defining the feature test macro.
1 parent d4ed253 commit b4c63ef

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
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-
"201411L"); // (not latest)
568+
LangOpts.CPlusPlus20 ? "201911L" : "201411L");
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
#error "wrong value for __cpp_structured_bindings"
156156
#endif
157157

158-
#if check(nontype_template_args, 0, 0, 0, 201411, 201411)
158+
#if check(nontype_template_args, 0, 0, 0, 201411, 201911)
159159
#error "wrong value for __cpp_nontype_template_args"
160160
#endif
161161

clang/www/cxx_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ <h2 id="cxx20">C++20 implementation status</h2>
10051005
<tr>
10061006
<td rowspan="2">Class types as non-type template parameters</td>
10071007
<td><a href="https://wg21.link/p0732r2">P0732R2</a></td>
1008-
<td rowspan="2" class="none" align="center">No</td>
1008+
<td rowspan="2" class="svn" align="center">Clang 12</td>
10091009
</tr>
10101010
<tr> <!-- from Belfast -->
10111011
<td><a href="https://wg21.link/p1907r1">P1907R1</a></td>

0 commit comments

Comments
 (0)