[clang] [Clang] Mark P1061 (Structured Bindings can introduce a Pack) as implemented (PR #127980)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 20 01:53:07 PST 2025
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/127980
None
>From 5dc1b59e2739ac3af24e05723f8d6240d6e8e139 Mon Sep 17 00:00:00 2001
From: Corentin Jabot <corentinjabot at gmail.com>
Date: Thu, 20 Feb 2025 10:51:15 +0100
Subject: [PATCH] [Clang] Mark P1061 (Structured Bindings can introduce a Pack)
as implemented.
---
clang/docs/LanguageExtensions.rst | 1 +
clang/docs/ReleaseNotes.rst | 4 +++-
clang/lib/Frontend/InitPreprocessor.cpp | 2 +-
clang/test/Lexer/cxx-features.cpp | 2 +-
clang/www/cxx_status.html | 2 +-
5 files changed, 7 insertions(+), 4 deletions(-)
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>
More information about the cfe-commits
mailing list