-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Clang] Mark P1061 (Structured Bindings can introduce a Pack) as implemented #127980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Clang] Mark P1061 (Structured Bindings can introduce a Pack) as implemented #127980
Conversation
@llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) ChangesFull diff: https://github.com/llvm/llvm-project/pull/127980.diff 5 Files Affected:
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 2a956ad5b2909..573977d81805a 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 a91c764860ccd..c286e01fbc0f8 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
^^^^^^^^^^^^^^^^^^^^^
@@ -271,7 +273,7 @@ Code Completion
Static Analyzer
---------------
-- Clang currently support extending lifetime of object bound to
+- Clang currently support extending lifetime of object bound to
reference members of aggregates in CFG and ExprEngine, that are
created from default member initializer.
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>
|
Note that there does not seem to be any appetite to backport that to 20 (#125000) - despite limited risks - so we mark it as a Clang 21 feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though I changed the patch summary to link it to the implementation work.
Implemented in abc8812