[libcxx-commits] [libcxx] WiP [libc++][FTM] Updated FTMs from C++29 (PR #218241)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 26 06:17:04 PDT 2026
https://github.com/H-G-Hristov 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/3] [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/3] 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/3] 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,
More information about the libcxx-commits
mailing list