[libcxx-commits] [libcxx] WiP [libc++][FTM] Updated FTMs from C++29 (PR #218241)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 27 05:52:55 PDT 2026


https://github.com/Zingam updated https://github.com/llvm/llvm-project/pull/218241

>From ed1f1ca9b903c23a3e729ea60919ddb6a971f344 Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Sun, 23 Aug 2026 16:24:35 +0300
Subject: [PATCH 1/7] [libc++][FTM] Updated FTMs from C++29 ... and a few
 missing ones from previous standard versions.

---
 .../generate_feature_test_macro_components.py | 96 +++++++++++++++++--
 1 file changed, 89 insertions(+), 7 deletions(-)

diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index 07de473bbc038..7da0d73b60f99 100644
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -246,7 +246,10 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_bitops",
-            "values": {"c++20": 201907},
+            "values": {
+                "c++20": 201907,
+                # "c++29": 202607,  # P3104R6 Bit permutations
+            },
             "headers": ["bit"],
         },
         {
@@ -336,7 +339,8 @@ def add_version_header(tc):
         {
             "name": "__cpp_lib_constant_wrapper",
             "values": {
-                "c++26": 202606,
+                "c++26": 202603,
+                # "c++29": 202606, # P4206R0 Revert string support in std::constant_wrapper
             },
             "headers": ["utility"],
         },
@@ -561,7 +565,10 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_expected",
-            "values": {"c++23": 202211},
+            "values": {
+                "c++23": 202211,
+                # "c++29": 202606 # P3798R1 The unexpected in std::expected
+            },
             "headers": ["expected"],
         },
         {
@@ -744,10 +751,11 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_hazard_pointer",
-            "values": {"c++26": 202306},  # P2530R3 Hazard Pointers for C++26
-            "headers": [
-                "hazard_pointer"  # TODO verify this entry since the paper was underspecified.
-            ],
+            "values": {
+                "c++26": 202306,  # P2530R3 Hazard Pointers for C++26
+                # "c++29": 202606,  # P3428R4 Hazard Pointer Batches
+            },  
+            "headers": ["hazard_pointer"],
             "unimplemented": True,
         },
         {
@@ -950,6 +958,14 @@ def add_version_header(tc):
             "values": {"c++14": 201304},
             "headers": ["memory"],
         },
+        {
+            "name": "__cpp_lib_map_lookup",
+            "values": {
+                "c++29": 202606 # P3091R6 Better Lookups for map , unordered_map , and flat_map
+            },
+            "headers": ["map"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_map_try_emplace",
             "values": {"c++17": 201411},
@@ -974,6 +990,14 @@ def add_version_header(tc):
             },
             "headers": ["mdspan"],
         },
+        {
+            "name": "__cpp_lib_mdspan_copy",
+            "values": {
+                "c++29": 202606  # P3242R4 Copy and fill for mdspan
+            },
+            "headers": ["mdspan"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_memory_resource",
             "values": {"c++17": 201603},
@@ -1073,6 +1097,14 @@ def add_version_header(tc):
             "headers": ["random"],
             "unimplemented": True,
         },
+        {
+            "name": "__cpp_lib_pointer_tag_pair",
+            "values": {
+                "c++29": 202606  # P3125R6 constexpr pointer tagging
+            },
+            "headers": ["memory"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_polymorphic_allocator",
             "values": {"c++20": 201902},
@@ -1313,6 +1345,47 @@ def add_version_header(tc):
             "values": {"c++20": 202002},
             "headers": ["memory"],
         },
+        {
+            "name": "__cpp_lib_simd",
+            "values": {
+                "c++26": 202606 # P3319R6 Add an iota object for simd (and more)
+            },
+            "headers": ["simd"],
+            "unimplemented": True,
+        },
+        {
+            "name": "__cpp_lib_simd_bitops",
+            "values": {
+                "c++29": 202607,  # P3772R2 std::simd overloads for bit permutations
+            },
+            "headers": ["simd"],
+            "unimplemented": True,
+        },
+        {
+            "name": "__cpp_lib_simd_complex",
+            "values": {
+                "c++29": 202502,  # P3793R2 Better shifting
+            },
+            "headers": ["simd"],
+            "unimplemented": True,
+        },
+        {
+            "name": "__cpp_lib_simd_permutations",
+            "values": {
+                "c++26": 202606 # P3319R6 Add an iota object for simd (and more)
+            },
+            "headers": ["simd"],
+            "unimplemented": True,
+        },
+        {
+            "name": "__cpp_lib_smart_ptr_for_overwrite",
+            "values": {
+                "c++20": 202002  # P1020R1 Smart pointer creation with default initialization
+                                 # P1973R1 Rename “_default_init” Functions
+            },
+            "headers": ["memory"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_smart_ptr_owner_equality",
             "values": {
@@ -1425,6 +1498,14 @@ def add_version_header(tc):
             },
             "headers": ["text_encoding"],
         },
+        {
+            "name": "__cpp_lib_thread_attributes",
+            "values": {
+                "c++29": 202606  # P2019R9 Thread attributes
+            },
+            "headers": ["compare"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_three_way_comparison",
             "values": {"c++20": 201907},
@@ -1445,6 +1526,7 @@ def add_version_header(tc):
             "values": {
                 "c++17": 201611,
                 "c++26": 202306,  # P2497R0 Testing for success or failure of <charconv> functions
+                # "c++29": 202606   # P3505R4 Fix the default floating-point representation in std::format
             },
             "headers": ["charconv"],
             "unimplemented": True,

>From df2225b89294c7cb40ff13df513fd2d59ea7c1ac Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Wed, 26 Aug 2026 14:41:40 +0300
Subject: [PATCH 2/7] Updates

---
 .../generate_feature_test_macro_components.py | 40 +++++--------------
 1 file changed, 11 insertions(+), 29 deletions(-)

diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index 7da0d73b60f99..c1c216477868b 100644
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -754,7 +754,7 @@ def add_version_header(tc):
             "values": {
                 "c++26": 202306,  # P2530R3 Hazard Pointers for C++26
                 # "c++29": 202606,  # P3428R4 Hazard Pointer Batches
-            },  
+            },
             "headers": ["hazard_pointer"],
             "unimplemented": True,
         },
@@ -960,9 +960,7 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_map_lookup",
-            "values": {
-                "c++29": 202606 # P3091R6 Better Lookups for map , unordered_map , and flat_map
-            },
+            "values": {"c++29": 202606},  # P3091R6 Better Lookups for map , unordered_map , and flat_map
             "headers": ["map"],
             "unimplemented": True,
         },
@@ -992,9 +990,7 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_mdspan_copy",
-            "values": {
-                "c++29": 202606  # P3242R4 Copy and fill for mdspan
-            },
+            "values": {"c++29": 202606},  # P3242R4 Copy and fill for mdspan
             "headers": ["mdspan"],
             "unimplemented": True,
         },
@@ -1099,9 +1095,7 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_pointer_tag_pair",
-            "values": {
-                "c++29": 202606  # P3125R6 constexpr pointer tagging
-            },
+            "values": {"c++29": 202606},  # P3125R6 constexpr pointer tagging
             "headers": ["memory"],
             "unimplemented": True,
         },
@@ -1347,42 +1341,32 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_simd",
-            "values": {
-                "c++26": 202606 # P3319R6 Add an iota object for simd (and more)
-            },
+            "values": {"c++26": 202606}, # P3319R6 Add an iota object for simd (and more)
             "headers": ["simd"],
             "unimplemented": True,
         },
         {
             "name": "__cpp_lib_simd_bitops",
-            "values": {
-                "c++29": 202607,  # P3772R2 std::simd overloads for bit permutations
-            },
+            "values": {"c++29": 202607},  # P3772R2 std::simd overloads for bit permutations
             "headers": ["simd"],
             "unimplemented": True,
         },
         {
             "name": "__cpp_lib_simd_complex",
-            "values": {
-                "c++29": 202502,  # P3793R2 Better shifting
-            },
+            "values": {"c++29": 202502},  # P3793R2 Better shifting
             "headers": ["simd"],
             "unimplemented": True,
         },
         {
             "name": "__cpp_lib_simd_permutations",
-            "values": {
-                "c++26": 202606 # P3319R6 Add an iota object for simd (and more)
-            },
+            "values": {"c++26": 202606}, # P3319R6 Add an iota object for simd (and more)
             "headers": ["simd"],
             "unimplemented": True,
         },
         {
             "name": "__cpp_lib_smart_ptr_for_overwrite",
-            "values": {
-                "c++20": 202002  # P1020R1 Smart pointer creation with default initialization
-                                 # P1973R1 Rename “_default_init” Functions
-            },
+            "values": {"c++20": 202002},  # P1020R1 Smart pointer creation with default initialization
+            # P1973R1 Rename “_default_init” Functions
             "headers": ["memory"],
             "unimplemented": True,
         },
@@ -1500,9 +1484,7 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_thread_attributes",
-            "values": {
-                "c++29": 202606  # P2019R9 Thread attributes
-            },
+            "values": {"c++29": 202606},  # P2019R9 Thread attributes
             "headers": ["compare"],
             "unimplemented": True,
         },

>From 3620f185b478522300875c4e05cab1db6850830f Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Wed, 26 Aug 2026 16:16:45 +0300
Subject: [PATCH 3/7] Formatting

---
 .../generate_feature_test_macro_components.py | 20 ++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index c1c216477868b..6ab63ddac1f8b 100644
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -960,7 +960,9 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_map_lookup",
-            "values": {"c++29": 202606},  # P3091R6 Better Lookups for map , unordered_map , and flat_map
+            "values": {
+                "c++29": 202606
+            },  # P3091R6 Better Lookups for map , unordered_map , and flat_map
             "headers": ["map"],
             "unimplemented": True,
         },
@@ -1341,13 +1343,17 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_simd",
-            "values": {"c++26": 202606}, # P3319R6 Add an iota object for simd (and more)
+            "values": {
+                "c++26": 202606
+            },  # P3319R6 Add an iota object for simd (and more)
             "headers": ["simd"],
             "unimplemented": True,
         },
         {
             "name": "__cpp_lib_simd_bitops",
-            "values": {"c++29": 202607},  # P3772R2 std::simd overloads for bit permutations
+            "values": {
+                "c++29": 202607
+            },  # P3772R2 std::simd overloads for bit permutations 
             "headers": ["simd"],
             "unimplemented": True,
         },
@@ -1359,13 +1365,17 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_simd_permutations",
-            "values": {"c++26": 202606}, # P3319R6 Add an iota object for simd (and more)
+            "values": {
+                "c++26": 202606
+            },  # P3319R6 Add an iota object for simd (and more)
             "headers": ["simd"],
             "unimplemented": True,
         },
         {
             "name": "__cpp_lib_smart_ptr_for_overwrite",
-            "values": {"c++20": 202002},  # P1020R1 Smart pointer creation with default initialization
+            "values": {
+                "c++20": 202002
+            },  # P1020R1 Smart pointer creation with default initialization
             # P1973R1 Rename “_default_init” Functions
             "headers": ["memory"],
             "unimplemented": True,

>From 7217cfc9aa1a76d88647fc19ae263330f3401079 Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Wed, 26 Aug 2026 17:22:52 +0300
Subject: [PATCH 4/7] Formatting

---
 libcxx/utils/generate_feature_test_macro_components.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index 6ab63ddac1f8b..38e22cbf099d6 100644
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -1353,7 +1353,7 @@ def add_version_header(tc):
             "name": "__cpp_lib_simd_bitops",
             "values": {
                 "c++29": 202607
-            },  # P3772R2 std::simd overloads for bit permutations 
+            },  # P3772R2 std::simd overloads for bit permutations
             "headers": ["simd"],
             "unimplemented": True,
         },

>From 559b9d2ef07e9a8a7873e0eaec386e14e4fc0d81 Mon Sep 17 00:00:00 2001
From: Hristo Hristov <zingam at outlook.com>
Date: Thu, 27 Aug 2026 15:38:26 +0300
Subject: [PATCH 5/7] Apply suggestions from code review

Co-authored-by: A. Jiang <de34 at live.cn>
---
 .../utils/generate_feature_test_macro_components.py  | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index 38e22cbf099d6..efbbae63676d3 100644
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -248,6 +248,7 @@ def add_version_header(tc):
             "name": "__cpp_lib_bitops",
             "values": {
                 "c++20": 201907,
+                # "c++29": 202606,  # P3793R2 Better shifting
                 # "c++29": 202607,  # P3104R6 Bit permutations
             },
             "headers": ["bit"],
@@ -962,8 +963,8 @@ def add_version_header(tc):
             "name": "__cpp_lib_map_lookup",
             "values": {
                 "c++29": 202606
-            },  # P3091R6 Better Lookups for map , unordered_map , and flat_map
-            "headers": ["map"],
+            },  # P3091R6 Better Lookups for map, unordered_map, and flat_map
+            "headers": ["flat_map", "map", "unordered_map"],
             "unimplemented": True,
         },
         {
@@ -1352,8 +1353,9 @@ def add_version_header(tc):
         {
             "name": "__cpp_lib_simd_bitops",
             "values": {
-                "c++29": 202607
-            },  # P3772R2 std::simd overloads for bit permutations
+                # "c++29": 202606 # P3793R2 Better shifting
+                "c++29": 202607 # P3772R2 std::simd overloads for bit permutations
+            },
             "headers": ["simd"],
             "unimplemented": True,
         },
@@ -1495,7 +1497,7 @@ def add_version_header(tc):
         {
             "name": "__cpp_lib_thread_attributes",
             "values": {"c++29": 202606},  # P2019R9 Thread attributes
-            "headers": ["compare"],
+            "headers": ["thread"],
             "unimplemented": True,
         },
         {

>From 60076c5a4ddd772af2bfbf0dc40bf87a4ef495db Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Thu, 27 Aug 2026 15:42:06 +0300
Subject: [PATCH 6/7] Apply suggestions from code review

---
 .../utils/generate_feature_test_macro_components.py   | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index efbbae63676d3..e7b95b8cb511b 100644
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -341,7 +341,7 @@ def add_version_header(tc):
             "name": "__cpp_lib_constant_wrapper",
             "values": {
                 "c++26": 202603,
-                # "c++29": 202606, # P4206R0 Revert string support in std::constant_wrapper
+                "c++29": 202606,
             },
             "headers": ["utility"],
         },
@@ -1373,15 +1373,6 @@ def add_version_header(tc):
             "headers": ["simd"],
             "unimplemented": True,
         },
-        {
-            "name": "__cpp_lib_smart_ptr_for_overwrite",
-            "values": {
-                "c++20": 202002
-            },  # P1020R1 Smart pointer creation with default initialization
-            # P1973R1 Rename “_default_init” Functions
-            "headers": ["memory"],
-            "unimplemented": True,
-        },
         {
             "name": "__cpp_lib_smart_ptr_owner_equality",
             "values": {

>From 7cd923965adb3c32c08a4676689f7a9e802f35be Mon Sep 17 00:00:00 2001
From: Hristo Hristov <zingam at outlook.com>
Date: Thu, 27 Aug 2026 15:52:24 +0300
Subject: [PATCH 7/7] Apply suggestion from @Zingam

---
 libcxx/utils/generate_feature_test_macro_components.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index e7b95b8cb511b..d44fcd9c7b3fc 100644
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -1354,7 +1354,7 @@ def add_version_header(tc):
             "name": "__cpp_lib_simd_bitops",
             "values": {
                 # "c++29": 202606 # P3793R2 Better shifting
-                "c++29": 202607 # P3772R2 std::simd overloads for bit permutations
+                "c++29": 202607  # P3772R2 std::simd overloads for bit permutations
             },
             "headers": ["simd"],
             "unimplemented": True,



More information about the libcxx-commits mailing list