[libcxx-commits] [libcxx] [libc++] Update `__cpp_lib_flat_set` to `202511L` according to P3567R2 (PR #176297)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 15 18:04:21 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: A. Jiang (frederick-vs-ja)
<details>
<summary>Changes</summary>
The paper was already implemented in LLVM22 in
cd13170aea2db35e04e4842806b14383864d3a97. 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
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"],
},
{
``````````
</details>
https://github.com/llvm/llvm-project/pull/176297
More information about the libcxx-commits
mailing list