Skip to content

[libc++] Update __cpp_lib_flat_set to 202511L according to P3567R2#176297

Merged
ldionne merged 1 commit intollvm:mainfrom
frederick-vs-ja:flat_set-ftm-202511
Jan 19, 2026
Merged

[libc++] Update __cpp_lib_flat_set to 202511L according to P3567R2#176297
ldionne merged 1 commit intollvm:mainfrom
frederick-vs-ja:flat_set-ftm-202511

Conversation

@frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Jan 16, 2026

The paper was already implemented in LLVM22 in cd13170. But the previous patch forgot updating __cpp_lib_flat_set.

Fixes #176232.

@frederick-vs-ja frederick-vs-ja added this to the LLVM 22.x Release milestone Jan 16, 2026
@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner January 16, 2026 02:03
@frederick-vs-ja frederick-vs-ja added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jan 16, 2026
@github-project-automation github-project-automation bot moved this to Needs Triage in LLVM Release Status Jan 16, 2026
@llvmbot
Copy link
Member

llvmbot commented Jan 16, 2026

@llvm/pr-subscribers-libcxx

Author: A. Jiang (frederick-vs-ja)

Changes

The paper was already implemented in LLVM22 in
cd13170. But the previous patch forgot updating __cpp_lib_flat_set.

Fixes #176232.


Full diff: https://github.com/llvm/llvm-project/pull/176297.diff

5 Files Affected:

  • (modified) libcxx/docs/FeatureTestMacroTable.rst (+1-1)
  • (modified) libcxx/include/version (+2-2)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/flat_set.version.compile.pass.cpp (+4-4)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp (+4-4)
  • (modified) libcxx/utils/generate_feature_test_macro_components.py (+1-1)
diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst
index 32911d0f64449..26084f7a7793a 100644
--- a/libcxx/docs/FeatureTestMacroTable.rst
+++ b/libcxx/docs/FeatureTestMacroTable.rst
@@ -336,7 +336,7 @@ Status
     ---------------------------------------------------------- -----------------
     ``__cpp_lib_flat_map``                                     ``202511L``
     ---------------------------------------------------------- -----------------
-    ``__cpp_lib_flat_set``                                     ``202207L``
+    ``__cpp_lib_flat_set``                                     ``202511L``
     ---------------------------------------------------------- -----------------
     ``__cpp_lib_format_ranges``                                ``202207L``
     ---------------------------------------------------------- -----------------
diff --git a/libcxx/include/version b/libcxx/include/version
index d47f0cb6cd41c..c80e34284f191 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -112,7 +112,7 @@ __cpp_lib_execution                                     201902L <execution>
 __cpp_lib_expected                                      202211L <expected>
 __cpp_lib_filesystem                                    201703L <filesystem>
 __cpp_lib_flat_map                                      202511L <flat_map>
-__cpp_lib_flat_set                                      202207L <flat_set>
+__cpp_lib_flat_set                                      202511L <flat_set>
 __cpp_lib_format                                        202110L <format>
 __cpp_lib_format_path                                   202403L <filesystem>
 __cpp_lib_format_ranges                                 202207L <format>
@@ -498,7 +498,7 @@ __cpp_lib_void_t                                        201411L <type_traits>
 # define __cpp_lib_containers_ranges                    202202L
 # define __cpp_lib_expected                             202211L
 # define __cpp_lib_flat_map                             202511L
-# define __cpp_lib_flat_set                             202207L
+# define __cpp_lib_flat_set                             202511L
 # define __cpp_lib_format_ranges                        202207L
 // # define __cpp_lib_formatters                           202302L
 # define __cpp_lib_forward_like                         202207L
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/flat_set.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/flat_set.version.compile.pass.cpp
index b29da9fdbe649..725e5107c8997 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/flat_set.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/flat_set.version.compile.pass.cpp
@@ -67,8 +67,8 @@
 #  ifndef __cpp_lib_flat_set
 #    error "__cpp_lib_flat_set should be defined in c++23"
 #  endif
-#  if __cpp_lib_flat_set != 202207L
-#    error "__cpp_lib_flat_set should have the value 202207L in c++23"
+#  if __cpp_lib_flat_set != 202511L
+#    error "__cpp_lib_flat_set should have the value 202511L in c++23"
 #  endif
 
 #elif TEST_STD_VER > 23
@@ -83,8 +83,8 @@
 #  ifndef __cpp_lib_flat_set
 #    error "__cpp_lib_flat_set should be defined in c++26"
 #  endif
-#  if __cpp_lib_flat_set != 202207L
-#    error "__cpp_lib_flat_set should have the value 202207L in c++26"
+#  if __cpp_lib_flat_set != 202511L
+#    error "__cpp_lib_flat_set should have the value 202511L in c++26"
 #  endif
 
 #endif // TEST_STD_VER > 23
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
index aacccc0451693..31c3f1898ff83 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
@@ -5088,8 +5088,8 @@
 #  ifndef __cpp_lib_flat_set
 #    error "__cpp_lib_flat_set should be defined in c++23"
 #  endif
-#  if __cpp_lib_flat_set != 202207L
-#    error "__cpp_lib_flat_set should have the value 202207L in c++23"
+#  if __cpp_lib_flat_set != 202511L
+#    error "__cpp_lib_flat_set should have the value 202511L in c++23"
 #  endif
 
 #  if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
@@ -6833,8 +6833,8 @@
 #  ifndef __cpp_lib_flat_set
 #    error "__cpp_lib_flat_set should be defined in c++26"
 #  endif
-#  if __cpp_lib_flat_set != 202207L
-#    error "__cpp_lib_flat_set should have the value 202207L in c++26"
+#  if __cpp_lib_flat_set != 202511L
+#    error "__cpp_lib_flat_set should have the value 202511L in c++26"
 #  endif
 
 #  if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index a847042bf47c0..71bddc79ef488 100644
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -562,7 +562,7 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_flat_set",
-            "values": {"c++23": 202207},
+            "values": {"c++23": 202511},
             "headers": ["flat_set"],
         },
         {

@frederick-vs-ja

This comment was marked as resolved.

@c-rhodes c-rhodes moved this from Needs Triage to Needs Review in LLVM Release Status Jan 16, 2026
The paper was already implemented in LLVM22 in
cd13170. But the previous patch forgot
updating `__cpp_lib_flat_set`.
Copy link
Member

@huixie90 huixie90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the change. Let's cherry-pick to LLVM 22

@c-rhodes c-rhodes moved this from Needs Review to Needs Fix in LLVM Release Status Jan 19, 2026
@ldionne ldionne merged commit bf6e986 into llvm:main Jan 19, 2026
82 checks passed
@github-project-automation github-project-automation bot moved this from Needs Fix to Done in LLVM Release Status Jan 19, 2026
@ldionne
Copy link
Member

ldionne commented Jan 19, 2026

/cherry-pick bf6e986

@llvmbot
Copy link
Member

llvmbot commented Jan 19, 2026

/pull-request #176814

@frederick-vs-ja frederick-vs-ja deleted the flat_set-ftm-202511 branch January 20, 2026 01:11
c-rhodes pushed a commit to llvmbot/llvm-project that referenced this pull request Jan 20, 2026
llvm#176297)

The paper was already implemented in LLVM22 in cd13170,
but the previous patch forgot to update `__cpp_lib_flat_set`.

Fixes llvm#176232.

(cherry picked from commit bf6e986)
BStott6 pushed a commit to BStott6/llvm-project that referenced this pull request Jan 22, 2026
llvm#176297)

The paper was already implemented in LLVM22 in cd13170,
but the previous patch forgot to update `__cpp_lib_flat_set`.

Fixes llvm#176232.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

Development

Successfully merging this pull request may close these issues.

The implementation of P3567R2 "flat_meow Fixes" forgot to update __cpp_lib_flat_set

4 participants