[clang] 12f8ed5 - [Clang] Mark P1061 (Structured Bindings can introduce a Pack) as implemented (#127980)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 20 04:55:36 PST 2025
Author: cor3ntin
Date: 2025-02-20T13:55:32+01:00
New Revision: 12f8ed58a039ff3a3365591203f76ae07a179215
URL: https://github.com/llvm/llvm-project/commit/12f8ed58a039ff3a3365591203f76ae07a179215
DIFF: https://github.com/llvm/llvm-project/commit/12f8ed58a039ff3a3365591203f76ae07a179215.diff
LOG: [Clang] Mark P1061 (Structured Bindings can introduce a Pack) as implemented (#127980)
Implemented in abc8812df02599fc413d9ed77b992f8236ed2af9
Added:
Modified:
clang/docs/LanguageExtensions.rst
clang/docs/ReleaseNotes.rst
clang/lib/Frontend/InitPreprocessor.cpp
clang/test/Lexer/cxx-features.cpp
clang/www/cxx_status.html
Removed:
################################################################################
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 5d9b68d4a7f2a..86295a3146510 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -1640,6 +1640,7 @@ Conditional ``explicit`` __cpp_conditional_explicit C+
``static operator()`` __cpp_static_call_operator C++23 C++03
Attributes on Lambda-Expressions C++23 C++11
Attributes on Structured Bindings __cpp_structured_bindings C++26 C++03
+Packs in Structured Bindings __cpp_structured_bindings C++26 C++03
Static assert with user-generated message __cpp_static_assert >= 202306L C++26 C++11
Pack Indexing __cpp_pack_indexing C++26 C++03
``= delete ("should have a reason");`` __cpp_deleted_function C++26 C++03
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 1659c4e1f5ea2..db42fc5cc0da7 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -71,6 +71,8 @@ C++ Language Changes
C++2c Feature Support
^^^^^^^^^^^^^^^^^^^^^
+- Implemented `P1061R10 Structured Bindings can introduce a Pack <https://wg21.link/P1061R10>`_.
+
C++23 Feature Support
^^^^^^^^^^^^^^^^^^^^^
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index 77833f5d1defb..e1dc728558def 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -720,7 +720,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
Builder.defineMacro("__cpp_nested_namespace_definitions", "201411L");
Builder.defineMacro("__cpp_variadic_using", "201611L");
Builder.defineMacro("__cpp_aggregate_bases", "201603L");
- Builder.defineMacro("__cpp_structured_bindings", "202403L");
+ Builder.defineMacro("__cpp_structured_bindings", "202411L");
Builder.defineMacro("__cpp_nontype_template_args",
"201411L"); // (not latest)
Builder.defineMacro("__cpp_fold_expressions", "201603L");
diff --git a/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp
index b423e94b26aca..ff9a1a1210c44 100644
--- a/clang/test/Lexer/cxx-features.cpp
+++ b/clang/test/Lexer/cxx-features.cpp
@@ -229,7 +229,7 @@
#error "wrong value for __cpp_aggregate_bases"
#endif
-#if check(structured_bindings, 0, 0, 0, 202403L, 202403L, 202403L, 202403L)
+#if check(structured_bindings, 0, 0, 0, 202411L, 202411L, 202411L, 202411L)
#error "wrong value for __cpp_structured_bindings"
#endif
diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html
index 2d5b96b47fe2d..2e2fecc418504 100755
--- a/clang/www/cxx_status.html
+++ b/clang/www/cxx_status.html
@@ -244,7 +244,7 @@ <h2 id="cxx26">C++2c implementation status</h2>
<tr>
<td>Structured Bindings can introduce a Pack</td>
<td><a href="https://wg21.link/P1061R10">P1061R10</a></td>
- <td class="none" align="center">No</td>
+ <td class="unreleased" align="center">Clang 21</td>
</tr>
<tr>
<td>The Oxford variadic comma</td>
More information about the cfe-commits
mailing list