[libcxx-commits] [libcxx] [libc++] Update status after the St. Louis meeting. (PR #97951)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jul 7 06:44:55 PDT 2024


https://github.com/mordante created https://github.com/llvm/llvm-project/pull/97951

This updates:
- The status tables
- Feature test macros
- New headers for modules

>From 8e30ce29e3c0985b5f3493339a6cd0961561284e Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Sun, 7 Jul 2024 15:34:29 +0200
Subject: [PATCH] [libc++] Update status after the St. Louis meeting.

This updates:
- The status tables
- Feature test macros
- New headers for modules
---
 libcxx/docs/FeatureTestMacroTable.rst         |  12 ++
 libcxx/docs/Status/Cxx2c.rst                  |   1 +
 libcxx/docs/Status/Cxx2cIssues.csv            |  15 +-
 libcxx/docs/Status/Cxx2cPapers.csv            |  13 ++
 libcxx/include/version                        |  12 ++
 libcxx/modules/std.compat.cppm.in             |   6 +
 libcxx/modules/std.cppm.in                    |   6 +
 .../execution.version.compile.pass.cpp        |  34 +++
 .../new.version.compile.pass.cpp              |  34 +++
 .../optional.version.compile.pass.cpp         |  44 +++-
 .../random.version.compile.pass.cpp           |  34 +++
 .../type_traits.version.compile.pass.cpp      |  34 +++
 .../version.version.compile.pass.cpp          | 204 ++++++++++++++++++
 .../generate_feature_test_macro_components.py |  52 ++++-
 libcxx/utils/libcxx/header_information.py     |   2 +
 15 files changed, 495 insertions(+), 8 deletions(-)

diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst
index 72f624fa746b4..2eff42918886c 100644
--- a/libcxx/docs/FeatureTestMacroTable.rst
+++ b/libcxx/docs/FeatureTestMacroTable.rst
@@ -402,6 +402,8 @@ Status
     ---------------------------------------------------------- -----------------
     ``__cpp_lib_bitset``                                       ``202306L``
     ---------------------------------------------------------- -----------------
+    ``__cpp_lib_constexpr_new``                                *unimplemented*
+    ---------------------------------------------------------- -----------------
     ``__cpp_lib_constrained_equality``                         *unimplemented*
     ---------------------------------------------------------- -----------------
     ``__cpp_lib_copyable_function``                            *unimplemented*
@@ -436,12 +438,20 @@ Status
     ---------------------------------------------------------- -----------------
     ``__cpp_lib_hazard_pointer``                               *unimplemented*
     ---------------------------------------------------------- -----------------
+    ``__cpp_lib_inplace_vector``                               *unimplemented*
+    ---------------------------------------------------------- -----------------
+    ``__cpp_lib_is_virtual_base_of``                           *unimplemented*
+    ---------------------------------------------------------- -----------------
     ``__cpp_lib_is_within_lifetime``                           *unimplemented*
     ---------------------------------------------------------- -----------------
     ``__cpp_lib_linalg``                                       *unimplemented*
     ---------------------------------------------------------- -----------------
+    ``__cpp_lib_optional_range_support``                       *unimplemented*
+    ---------------------------------------------------------- -----------------
     ``__cpp_lib_out_ptr``                                      *unimplemented*
     ---------------------------------------------------------- -----------------
+    ``__cpp_lib_philox_engine``                                *unimplemented*
+    ---------------------------------------------------------- -----------------
     ``__cpp_lib_ranges_concat``                                *unimplemented*
     ---------------------------------------------------------- -----------------
     ``__cpp_lib_ratio``                                        ``202306L``
@@ -452,6 +462,8 @@ Status
     ---------------------------------------------------------- -----------------
     ``__cpp_lib_saturation_arithmetic``                        ``202311L``
     ---------------------------------------------------------- -----------------
+    ``__cpp_lib_senders``                                      *unimplemented*
+    ---------------------------------------------------------- -----------------
     ``__cpp_lib_smart_ptr_owner_equality``                     *unimplemented*
     ---------------------------------------------------------- -----------------
     ``__cpp_lib_span_at``                                      ``202311L``
diff --git a/libcxx/docs/Status/Cxx2c.rst b/libcxx/docs/Status/Cxx2c.rst
index 5f459b4b3e4e6..03a6eeaa40c79 100644
--- a/libcxx/docs/Status/Cxx2c.rst
+++ b/libcxx/docs/Status/Cxx2c.rst
@@ -42,6 +42,7 @@ Paper Status
    .. [#note-P2510R3] This paper is applied as DR against C++20. (MSVC STL and libstdc++ will do the same.)
    .. [#note-P3142R0] This paper is applied as DR against C++23. (MSVC STL and libstdc++ will do the same.)
    .. [#note-P2944R3] Implemented comparisons for ``reference_wrapper`` only.
+   .. [#note-P2422R1] Libc++ keeps the ``nodiscard`` attributes as a conforming extension.
 
 .. _issues-status-cxx2c:
 
diff --git a/libcxx/docs/Status/Cxx2cIssues.csv b/libcxx/docs/Status/Cxx2cIssues.csv
index 8d24457186310..18cbe8f8b738a 100644
--- a/libcxx/docs/Status/Cxx2cIssues.csv
+++ b/libcxx/docs/Status/Cxx2cIssues.csv
@@ -62,7 +62,20 @@
 "`4053 <https://wg21.link/LWG4053>`__","Unary call to ``std::views::repeat`` does not decay the argument","Tokyo March 2024","|Complete|","19.0","|ranges|"
 "`4054 <https://wg21.link/LWG4054>`__","Repeating a ``repeat_view`` should repeat the view","Tokyo March 2024","|Complete|","19.0","|ranges|"
 "","","","","",""
+"`3944 <https://wg21.link/LWG3944>`__","Formatters converting sequences of ``char`` to sequences of ``wchar_t``","St. Louis June 2024","","","|format|"
+"`4060 <https://wg21.link/LWG4060>`__","``submdspan`` preconditions do not forbid creating invalid pointer","St. Louis June 2024","","",""
+"`4061 <https://wg21.link/LWG4061>`__","Should ``std::basic_format_context`` be default-constructible/copyable/movable?","St. Louis June 2024","","","|format|"
+"`4071 <https://wg21.link/LWG4071>`__","``reference_wrapper`` comparisons are not SFINAE-friendly","St. Louis June 2024","|Complete|","19.0",""
+"`4074 <https://wg21.link/LWG4074>`__","``compatible-joinable-ranges`` is underconstrained","St. Louis June 2024","","","|ranges|"
+"`4076 <https://wg21.link/LWG4076>`__","``concat_view`` should be freestanding","St. Louis June 2024","","",""
+"`4079 <https://wg21.link/LWG4079>`__","Missing Preconditions in ``concat_view::iterator``\`s conversion constructor","St. Louis June 2024","","","|ranges|"
+"`4082 <https://wg21.link/LWG4082>`__","``views::concat(r)`` is well-formed when ``r`` is an ``output_range``","St. Louis June 2024","","","|ranges|"
+"`4083 <https://wg21.link/LWG4083>`__","``views::as_rvalue`` should reject non-input ranges","St. Louis June 2024","","","|ranges|"
+"`4096 <https://wg21.link/LWG4096>`__","``views::iota(views::iota(0))`` should be rejected","St. Louis June 2024","","","|ranges|"
+"`4098 <https://wg21.link/LWG4098>`__","``views::adjacent<0>`` should reject non-forward ranges","St. Louis June 2024","","","|ranges|"
+"`4105 <https://wg21.link/LWG4105>`__","``ranges::ends_with``\`s Returns misses difference casting","St. Louis June 2024","","","|ranges|"
+"`4106 <https://wg21.link/LWG4106>`__","``basic_format_args`` should not be default-constructible","St. Louis June 2024","","","|format|"
+"","","","","",""
 "`3343 <https://wg21.link/LWG3343>`__","Ordering of calls to ``unlock()`` and ``notify_all()`` in Effects element of ``notify_all_at_thread_exit()`` should be reversed","Not Yet Adopted","|Complete|","16.0",""
 "XXXX","","The sys_info range should be affected by save","Not Yet Adopted","|Complete|","19.0"
-"`4071 <https://wg21.link/LWG4071>`__","","``reference_wrapper`` comparisons are not SFINAE-friendly","Not Yet Adopted","|Complete|","19.0"
 "","","","","",""
diff --git a/libcxx/docs/Status/Cxx2cPapers.csv b/libcxx/docs/Status/Cxx2cPapers.csv
index ea060f18acdee..48d45e24a05b2 100644
--- a/libcxx/docs/Status/Cxx2cPapers.csv
+++ b/libcxx/docs/Status/Cxx2cPapers.csv
@@ -63,3 +63,16 @@
 "`P2642R6 <https://wg21.link/P2642R6>`__","LWG","Padded ``mdspan`` layouts","Tokyo March 2024","","",""
 "`P3029R1 <https://wg21.link/P3029R1>`__","LWG","Better ``mdspan``'s CTAD","Tokyo March 2024","|Complete|","19.0",""
 "","","","","","",""
+"`P2747R2 <https://wg21.link/P2747R2>`__","CWG","``constexpr`` placement new","St. Louis June 2024","","",""
+"`P2997R1 <https://wg21.link/P2997R1>`__","LWG","Removing the common reference requirement from the indirectly invocable concepts","St. Louis June 2024","","",""
+"`P2389R2 <https://wg21.link/P2389R2>`__","LWG","``dextents`` Index Type Parameter","St. Louis June 2024","","",""
+"`P3168R2 <https://wg21.link/P3168R2>`__","LWG","Give ``std::optional`` Range Support","St. Louis June 2024","","","|ranges|"
+"`P3217R0 <https://wg21.link/P3217R0>`__","LWG","Adjoints to 'Enabling list-initialization for algorithms': find_last","St. Louis June 2024","","",""
+"`P2985R0 <https://wg21.link/P2985R0>`__","LWG","A type trait for detecting virtual base classes","St. Louis June 2024","","",""
+"`P0843R14 <https://wg21.link/P0843R14>`__","LWG","``inplace_vector``","St. Louis June 2024","","",""
+"`P3235R3 <https://wg21.link/P3235R3>`__","LWG","``std::print`` more types faster with less memory","St. Louis June 2024","","","|format| |DR|"
+"`P2968R2 <https://wg21.link/P2968R2>`__","LWG","Make ``std::ignore`` a first-class object","St. Louis June 2024","","",""
+"`P2075R6 <https://wg21.link/P2075R6>`__","LWG","Philox as an extension of the C++ RNG engines","St. Louis June 2024","","",""
+"`P2422R1 <https://wg21.link/P2422R1>`__","LWG","Remove ``nodiscard`` annotations from the standard library specification","St. Louis June 2024","|Complete| [#note-P2422R1]_","19.0",""
+"`P2300R10 <https://wg21.link/P2300R10>`__","LWG","``std::execution``","St. Louis June 2024","","",""
+"","","","","","",""
diff --git a/libcxx/include/version b/libcxx/include/version
index cac6eaa3b6e88..460af8b6d396c 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -70,6 +70,7 @@ __cpp_lib_constexpr_functional                          201907L <functional>
 __cpp_lib_constexpr_iterator                            201811L <iterator>
 __cpp_lib_constexpr_memory                              202202L <memory>
                                                         201811L // C++20
+__cpp_lib_constexpr_new                                 202406L <new>
 __cpp_lib_constexpr_numeric                             201911L <numeric>
 __cpp_lib_constexpr_string                              201907L <string>
 __cpp_lib_constexpr_string_view                         201811L <string_view>
@@ -125,6 +126,7 @@ __cpp_lib_has_unique_object_representations             201606L <type_traits>
 __cpp_lib_hazard_pointer                                202306L <hazard_pointer>
 __cpp_lib_hypot                                         201603L <cmath>
 __cpp_lib_incomplete_container_elements                 201505L <forward_list> <list> <vector>
+__cpp_lib_inplace_vector                                202406L <inplace_vector>
 __cpp_lib_int_pow2                                      202002L <bit>
 __cpp_lib_integer_comparison_functions                  202002L <utility>
 __cpp_lib_integer_sequence                              201304L <utility>
@@ -143,6 +145,7 @@ __cpp_lib_is_null_pointer                               201309L <type_traits>
 __cpp_lib_is_pointer_interconvertible                   201907L <type_traits>
 __cpp_lib_is_scoped_enum                                202011L <type_traits>
 __cpp_lib_is_swappable                                  201603L <type_traits>
+__cpp_lib_is_virtual_base_of                            202406L <type_traits>
 __cpp_lib_is_within_lifetime                            202306L <type_traits>
 __cpp_lib_jthread                                       201911L <stop_token> <thread>
 __cpp_lib_latch                                         201907L <latch>
@@ -170,9 +173,11 @@ __cpp_lib_not_fn                                        201603L <functional>
 __cpp_lib_null_iterators                                201304L <iterator>
 __cpp_lib_optional                                      202110L <optional>
                                                         201606L // C++17
+__cpp_lib_optional_range_support                        202406L <optional>
 __cpp_lib_out_ptr                                       202311L <memory>
                                                         202106L // C++23
 __cpp_lib_parallel_algorithm                            201603L <algorithm> <numeric>
+__cpp_lib_philox_engine                                 202406L <random>
 __cpp_lib_polymorphic_allocator                         201902L <memory_resource>
 __cpp_lib_print                                         202207L <ostream> <print>
 __cpp_lib_quoted_string_io                              201304L <iomanip>
@@ -203,6 +208,7 @@ __cpp_lib_sample                                        201603L <algorithm>
 __cpp_lib_saturation_arithmetic                         202311L <numeric>
 __cpp_lib_scoped_lock                                   201703L <mutex>
 __cpp_lib_semaphore                                     201907L <semaphore>
+__cpp_lib_senders                                       202406L <execution>
 __cpp_lib_shared_mutex                                  201505L <shared_mutex>
 __cpp_lib_shared_ptr_arrays                             201707L <memory>
                                                         201611L // C++17
@@ -500,6 +506,7 @@ __cpp_lib_void_t                                        201411L <type_traits>
 # undef  __cpp_lib_bind_front
 # define __cpp_lib_bind_front                           202306L
 # define __cpp_lib_bitset                               202306L
+// # define __cpp_lib_constexpr_new                        202406L
 // # define __cpp_lib_constrained_equality                 202403L
 // # define __cpp_lib_copyable_function                    202306L
 // # define __cpp_lib_debugging                            202311L
@@ -519,15 +526,20 @@ __cpp_lib_void_t                                        201411L <type_traits>
 // # define __cpp_lib_function_ref                         202306L
 // # define __cpp_lib_generate_random                      202403L
 // # define __cpp_lib_hazard_pointer                       202306L
+// # define __cpp_lib_inplace_vector                       202406L
+// # define __cpp_lib_is_virtual_base_of                   202406L
 // # define __cpp_lib_is_within_lifetime                   202306L
 // # define __cpp_lib_linalg                               202311L
+// # define __cpp_lib_optional_range_support               202406L
 # undef  __cpp_lib_out_ptr
 // # define __cpp_lib_out_ptr                              202311L
+// # define __cpp_lib_philox_engine                        202406L
 // # define __cpp_lib_ranges_concat                        202403L
 # define __cpp_lib_ratio                                202306L
 // # define __cpp_lib_rcu                                  202306L
 # define __cpp_lib_reference_wrapper                    202403L
 # define __cpp_lib_saturation_arithmetic                202311L
+// # define __cpp_lib_senders                              202406L
 // # define __cpp_lib_smart_ptr_owner_equality             202306L
 # define __cpp_lib_span_at                              202311L
 # define __cpp_lib_span_initializer_list                202311L
diff --git a/libcxx/modules/std.compat.cppm.in b/libcxx/modules/std.compat.cppm.in
index b44dbab25c74b..2864d48fed312 100644
--- a/libcxx/modules/std.compat.cppm.in
+++ b/libcxx/modules/std.compat.cppm.in
@@ -57,6 +57,9 @@ module;
 #  if __has_include(<debugging>)
 #    error "please update the header information for <debugging> in headers_not_available in utils/libcxx/header_information.py"
 #  endif // __has_include(<debugging>)
+#  if __has_include(<execution>)
+#    error "please update the header information for <execution> in headers_not_available in utils/libcxx/header_information.py"
+#  endif // __has_include(<execution>)
 #  if __has_include(<flat_map>)
 #    error "please update the header information for <flat_map> in headers_not_available in utils/libcxx/header_information.py"
 #  endif // __has_include(<flat_map>)
@@ -69,6 +72,9 @@ module;
 #  if __has_include(<hazard_pointer>)
 #    error "please update the header information for <hazard_pointer> in headers_not_available in utils/libcxx/header_information.py"
 #  endif // __has_include(<hazard_pointer>)
+#  if __has_include(<inplace_vector>)
+#    error "please update the header information for <inplace_vector> in headers_not_available in utils/libcxx/header_information.py"
+#  endif // __has_include(<inplace_vector>)
 #  if __has_include(<linalg>)
 #    error "please update the header information for <linalg> in headers_not_available in utils/libcxx/header_information.py"
 #  endif // __has_include(<linalg>)
diff --git a/libcxx/modules/std.cppm.in b/libcxx/modules/std.cppm.in
index b8d89130aae98..88e3548ce5708 100644
--- a/libcxx/modules/std.cppm.in
+++ b/libcxx/modules/std.cppm.in
@@ -179,6 +179,9 @@ module;
 #  if __has_include(<debugging>)
 #    error "please update the header information for <debugging> in headers_not_available in utils/libcxx/header_information.py"
 #  endif // __has_include(<debugging>)
+#  if __has_include(<execution>)
+#    error "please update the header information for <execution> in headers_not_available in utils/libcxx/header_information.py"
+#  endif // __has_include(<execution>)
 #  if __has_include(<flat_map>)
 #    error "please update the header information for <flat_map> in headers_not_available in utils/libcxx/header_information.py"
 #  endif // __has_include(<flat_map>)
@@ -191,6 +194,9 @@ module;
 #  if __has_include(<hazard_pointer>)
 #    error "please update the header information for <hazard_pointer> in headers_not_available in utils/libcxx/header_information.py"
 #  endif // __has_include(<hazard_pointer>)
+#  if __has_include(<inplace_vector>)
+#    error "please update the header information for <inplace_vector> in headers_not_available in utils/libcxx/header_information.py"
+#  endif // __has_include(<inplace_vector>)
 #  if __has_include(<linalg>)
 #    error "please update the header information for <linalg> in headers_not_available in utils/libcxx/header_information.py"
 #  endif // __has_include(<linalg>)
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp
index 047248573de40..d3c6d7b158eba 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp
@@ -18,6 +18,7 @@
 /*  Constant               Value
     __cpp_lib_execution    201603L [C++17]
                            201902L [C++20]
+    __cpp_lib_senders      202406L [C++26]
 */
 
 #include <execution>
@@ -29,12 +30,20 @@
 #   error "__cpp_lib_execution should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_senders
+#   error "__cpp_lib_senders should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 14
 
 # ifdef __cpp_lib_execution
 #   error "__cpp_lib_execution should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_senders
+#   error "__cpp_lib_senders should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 17
 
 # if !defined(_LIBCPP_VERSION)
@@ -50,6 +59,10 @@
 #   endif
 # endif
 
+# ifdef __cpp_lib_senders
+#   error "__cpp_lib_senders should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 20
 
 # if !defined(_LIBCPP_VERSION)
@@ -65,6 +78,10 @@
 #   endif
 # endif
 
+# ifdef __cpp_lib_senders
+#   error "__cpp_lib_senders should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 23
 
 # if !defined(_LIBCPP_VERSION)
@@ -80,6 +97,10 @@
 #   endif
 # endif
 
+# ifdef __cpp_lib_senders
+#   error "__cpp_lib_senders should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER > 23
 
 # if !defined(_LIBCPP_VERSION)
@@ -95,5 +116,18 @@
 #   endif
 # endif
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_senders
+#     error "__cpp_lib_senders should be defined in c++26"
+#   endif
+#   if __cpp_lib_senders != 202406L
+#     error "__cpp_lib_senders should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_senders
+#     error "__cpp_lib_senders should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 #endif // TEST_STD_VER > 23
 
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.compile.pass.cpp
index feb88bfb37e89..17c1bd71eee67 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.compile.pass.cpp
@@ -16,6 +16,7 @@
 // Test the feature test macros defined by <new>
 
 /*  Constant                                Value
+    __cpp_lib_constexpr_new                 202406L [C++26]
     __cpp_lib_destroying_delete             201806L [C++20]
     __cpp_lib_hardware_interference_size    201703L [C++17]
     __cpp_lib_launder                       201606L [C++17]
@@ -26,6 +27,10 @@
 
 #if TEST_STD_VER < 14
 
+# ifdef __cpp_lib_constexpr_new
+#   error "__cpp_lib_constexpr_new should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_destroying_delete
 #   error "__cpp_lib_destroying_delete should not be defined before c++20"
 # endif
@@ -40,6 +45,10 @@
 
 #elif TEST_STD_VER == 14
 
+# ifdef __cpp_lib_constexpr_new
+#   error "__cpp_lib_constexpr_new should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_destroying_delete
 #   error "__cpp_lib_destroying_delete should not be defined before c++20"
 # endif
@@ -54,6 +63,10 @@
 
 #elif TEST_STD_VER == 17
 
+# ifdef __cpp_lib_constexpr_new
+#   error "__cpp_lib_constexpr_new should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_destroying_delete
 #   error "__cpp_lib_destroying_delete should not be defined before c++20"
 # endif
@@ -80,6 +93,10 @@
 
 #elif TEST_STD_VER == 20
 
+# ifdef __cpp_lib_constexpr_new
+#   error "__cpp_lib_constexpr_new should not be defined before c++26"
+# endif
+
 # if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
 #   ifndef __cpp_lib_destroying_delete
 #     error "__cpp_lib_destroying_delete should be defined in c++20"
@@ -115,6 +132,10 @@
 
 #elif TEST_STD_VER == 23
 
+# ifdef __cpp_lib_constexpr_new
+#   error "__cpp_lib_constexpr_new should not be defined before c++26"
+# endif
+
 # if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
 #   ifndef __cpp_lib_destroying_delete
 #     error "__cpp_lib_destroying_delete should be defined in c++23"
@@ -150,6 +171,19 @@
 
 #elif TEST_STD_VER > 23
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_constexpr_new
+#     error "__cpp_lib_constexpr_new should be defined in c++26"
+#   endif
+#   if __cpp_lib_constexpr_new != 202406L
+#     error "__cpp_lib_constexpr_new should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_constexpr_new
+#     error "__cpp_lib_constexpr_new should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 # if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
 #   ifndef __cpp_lib_destroying_delete
 #     error "__cpp_lib_destroying_delete should be defined in c++26"
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.compile.pass.cpp
index 15350a949e168..f265be091f79b 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.compile.pass.cpp
@@ -15,11 +15,12 @@
 
 // Test the feature test macros defined by <optional>
 
-/*  Constant                           Value
-    __cpp_lib_constrained_equality     202403L [C++26]
-    __cpp_lib_freestanding_optional    202311L [C++26]
-    __cpp_lib_optional                 201606L [C++17]
-                                       202110L [C++23]
+/*  Constant                            Value
+    __cpp_lib_constrained_equality      202403L [C++26]
+    __cpp_lib_freestanding_optional     202311L [C++26]
+    __cpp_lib_optional                  201606L [C++17]
+                                        202110L [C++23]
+    __cpp_lib_optional_range_support    202406L [C++26]
 */
 
 #include <optional>
@@ -39,6 +40,10 @@
 #   error "__cpp_lib_optional should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_optional_range_support
+#   error "__cpp_lib_optional_range_support should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 14
 
 # ifdef __cpp_lib_constrained_equality
@@ -53,6 +58,10 @@
 #   error "__cpp_lib_optional should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_optional_range_support
+#   error "__cpp_lib_optional_range_support should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 17
 
 # ifdef __cpp_lib_constrained_equality
@@ -70,6 +79,10 @@
 #   error "__cpp_lib_optional should have the value 201606L in c++17"
 # endif
 
+# ifdef __cpp_lib_optional_range_support
+#   error "__cpp_lib_optional_range_support should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 20
 
 # ifdef __cpp_lib_constrained_equality
@@ -87,6 +100,10 @@
 #   error "__cpp_lib_optional should have the value 201606L in c++20"
 # endif
 
+# ifdef __cpp_lib_optional_range_support
+#   error "__cpp_lib_optional_range_support should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 23
 
 # ifdef __cpp_lib_constrained_equality
@@ -104,6 +121,10 @@
 #   error "__cpp_lib_optional should have the value 202110L in c++23"
 # endif
 
+# ifdef __cpp_lib_optional_range_support
+#   error "__cpp_lib_optional_range_support should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER > 23
 
 # if !defined(_LIBCPP_VERSION)
@@ -139,5 +160,18 @@
 #   error "__cpp_lib_optional should have the value 202110L in c++26"
 # endif
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_optional_range_support
+#     error "__cpp_lib_optional_range_support should be defined in c++26"
+#   endif
+#   if __cpp_lib_optional_range_support != 202406L
+#     error "__cpp_lib_optional_range_support should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_optional_range_support
+#     error "__cpp_lib_optional_range_support should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 #endif // TEST_STD_VER > 23
 
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/random.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/random.version.compile.pass.cpp
index 1f138d948cfce..2e36c73172cd4 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/random.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/random.version.compile.pass.cpp
@@ -17,6 +17,7 @@
 
 /*  Constant                     Value
     __cpp_lib_generate_random    202403L [C++26]
+    __cpp_lib_philox_engine      202406L [C++26]
 */
 
 #include <random>
@@ -28,30 +29,50 @@
 #   error "__cpp_lib_generate_random should not be defined before c++26"
 # endif
 
+# ifdef __cpp_lib_philox_engine
+#   error "__cpp_lib_philox_engine should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 14
 
 # ifdef __cpp_lib_generate_random
 #   error "__cpp_lib_generate_random should not be defined before c++26"
 # endif
 
+# ifdef __cpp_lib_philox_engine
+#   error "__cpp_lib_philox_engine should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 17
 
 # ifdef __cpp_lib_generate_random
 #   error "__cpp_lib_generate_random should not be defined before c++26"
 # endif
 
+# ifdef __cpp_lib_philox_engine
+#   error "__cpp_lib_philox_engine should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 20
 
 # ifdef __cpp_lib_generate_random
 #   error "__cpp_lib_generate_random should not be defined before c++26"
 # endif
 
+# ifdef __cpp_lib_philox_engine
+#   error "__cpp_lib_philox_engine should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER == 23
 
 # ifdef __cpp_lib_generate_random
 #   error "__cpp_lib_generate_random should not be defined before c++26"
 # endif
 
+# ifdef __cpp_lib_philox_engine
+#   error "__cpp_lib_philox_engine should not be defined before c++26"
+# endif
+
 #elif TEST_STD_VER > 23
 
 # if !defined(_LIBCPP_VERSION)
@@ -67,5 +88,18 @@
 #   endif
 # endif
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_philox_engine
+#     error "__cpp_lib_philox_engine should be defined in c++26"
+#   endif
+#   if __cpp_lib_philox_engine != 202406L
+#     error "__cpp_lib_philox_engine should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_philox_engine
+#     error "__cpp_lib_philox_engine should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 #endif // TEST_STD_VER > 23
 
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp
index 98277f832f5a0..bb69ca7368aaf 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp
@@ -30,6 +30,7 @@
     __cpp_lib_is_pointer_interconvertible          201907L [C++20]
     __cpp_lib_is_scoped_enum                       202011L [C++23]
     __cpp_lib_is_swappable                         201603L [C++17]
+    __cpp_lib_is_virtual_base_of                   202406L [C++26]
     __cpp_lib_is_within_lifetime                   202306L [C++26]
     __cpp_lib_logical_traits                       201510L [C++17]
     __cpp_lib_reference_from_temporary             202202L [C++23]
@@ -102,6 +103,10 @@
 #   error "__cpp_lib_is_swappable should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_is_virtual_base_of
+#   error "__cpp_lib_is_virtual_base_of should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_is_within_lifetime
 #   error "__cpp_lib_is_within_lifetime should not be defined before c++26"
 # endif
@@ -205,6 +210,10 @@
 #   error "__cpp_lib_is_swappable should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_is_virtual_base_of
+#   error "__cpp_lib_is_virtual_base_of should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_is_within_lifetime
 #   error "__cpp_lib_is_within_lifetime should not be defined before c++26"
 # endif
@@ -329,6 +338,10 @@
 #   error "__cpp_lib_is_swappable should have the value 201603L in c++17"
 # endif
 
+# ifdef __cpp_lib_is_virtual_base_of
+#   error "__cpp_lib_is_virtual_base_of should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_is_within_lifetime
 #   error "__cpp_lib_is_within_lifetime should not be defined before c++26"
 # endif
@@ -489,6 +502,10 @@
 #   error "__cpp_lib_is_swappable should have the value 201603L in c++20"
 # endif
 
+# ifdef __cpp_lib_is_virtual_base_of
+#   error "__cpp_lib_is_virtual_base_of should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_is_within_lifetime
 #   error "__cpp_lib_is_within_lifetime should not be defined before c++26"
 # endif
@@ -658,6 +675,10 @@
 #   error "__cpp_lib_is_swappable should have the value 201603L in c++23"
 # endif
 
+# ifdef __cpp_lib_is_virtual_base_of
+#   error "__cpp_lib_is_virtual_base_of should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_is_within_lifetime
 #   error "__cpp_lib_is_within_lifetime should not be defined before c++26"
 # endif
@@ -836,6 +857,19 @@
 #   error "__cpp_lib_is_swappable should have the value 201603L in c++26"
 # endif
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_is_virtual_base_of
+#     error "__cpp_lib_is_virtual_base_of should be defined in c++26"
+#   endif
+#   if __cpp_lib_is_virtual_base_of != 202406L
+#     error "__cpp_lib_is_virtual_base_of should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_is_virtual_base_of
+#     error "__cpp_lib_is_virtual_base_of should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 # if !defined(_LIBCPP_VERSION)
 #   ifndef __cpp_lib_is_within_lifetime
 #     error "__cpp_lib_is_within_lifetime should be defined in c++26"
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 32ed30e21cbbe..9a5a10a8fb0f5 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
@@ -65,6 +65,7 @@
     __cpp_lib_constexpr_iterator                            201811L [C++20]
     __cpp_lib_constexpr_memory                              201811L [C++20]
                                                             202202L [C++23]
+    __cpp_lib_constexpr_new                                 202406L [C++26]
     __cpp_lib_constexpr_numeric                             201911L [C++20]
     __cpp_lib_constexpr_string                              201907L [C++20]
     __cpp_lib_constexpr_string_view                         201811L [C++20]
@@ -112,6 +113,7 @@
     __cpp_lib_hazard_pointer                                202306L [C++26]
     __cpp_lib_hypot                                         201603L [C++17]
     __cpp_lib_incomplete_container_elements                 201505L [C++17]
+    __cpp_lib_inplace_vector                                202406L [C++26]
     __cpp_lib_int_pow2                                      202002L [C++20]
     __cpp_lib_integer_comparison_functions                  202002L [C++20]
     __cpp_lib_integer_sequence                              201304L [C++14]
@@ -130,6 +132,7 @@
     __cpp_lib_is_pointer_interconvertible                   201907L [C++20]
     __cpp_lib_is_scoped_enum                                202011L [C++23]
     __cpp_lib_is_swappable                                  201603L [C++17]
+    __cpp_lib_is_virtual_base_of                            202406L [C++26]
     __cpp_lib_is_within_lifetime                            202306L [C++26]
     __cpp_lib_jthread                                       201911L [C++20]
     __cpp_lib_latch                                         201907L [C++20]
@@ -154,9 +157,11 @@
     __cpp_lib_null_iterators                                201304L [C++14]
     __cpp_lib_optional                                      201606L [C++17]
                                                             202110L [C++23]
+    __cpp_lib_optional_range_support                        202406L [C++26]
     __cpp_lib_out_ptr                                       202106L [C++23]
                                                             202311L [C++26]
     __cpp_lib_parallel_algorithm                            201603L [C++17]
+    __cpp_lib_philox_engine                                 202406L [C++26]
     __cpp_lib_polymorphic_allocator                         201902L [C++20]
     __cpp_lib_print                                         202207L [C++23]
     __cpp_lib_quoted_string_io                              201304L [C++14]
@@ -186,6 +191,7 @@
     __cpp_lib_saturation_arithmetic                         202311L [C++26]
     __cpp_lib_scoped_lock                                   201703L [C++17]
     __cpp_lib_semaphore                                     201907L [C++20]
+    __cpp_lib_senders                                       202406L [C++26]
     __cpp_lib_shared_mutex                                  201505L [C++17]
     __cpp_lib_shared_ptr_arrays                             201611L [C++17]
                                                             201707L [C++20]
@@ -425,6 +431,10 @@
 #   error "__cpp_lib_constexpr_memory should not be defined before c++20"
 # endif
 
+# ifdef __cpp_lib_constexpr_new
+#   error "__cpp_lib_constexpr_new should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_constexpr_numeric
 #   error "__cpp_lib_constexpr_numeric should not be defined before c++20"
 # endif
@@ -609,6 +619,10 @@
 #   error "__cpp_lib_incomplete_container_elements should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_inplace_vector
+#   error "__cpp_lib_inplace_vector should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_int_pow2
 #   error "__cpp_lib_int_pow2 should not be defined before c++20"
 # endif
@@ -681,6 +695,10 @@
 #   error "__cpp_lib_is_swappable should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_is_virtual_base_of
+#   error "__cpp_lib_is_virtual_base_of should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_is_within_lifetime
 #   error "__cpp_lib_is_within_lifetime should not be defined before c++26"
 # endif
@@ -773,6 +791,10 @@
 #   error "__cpp_lib_optional should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_optional_range_support
+#   error "__cpp_lib_optional_range_support should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_out_ptr
 #   error "__cpp_lib_out_ptr should not be defined before c++23"
 # endif
@@ -781,6 +803,10 @@
 #   error "__cpp_lib_parallel_algorithm should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_philox_engine
+#   error "__cpp_lib_philox_engine should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_polymorphic_allocator
 #   error "__cpp_lib_polymorphic_allocator should not be defined before c++20"
 # endif
@@ -897,6 +923,10 @@
 #   error "__cpp_lib_semaphore should not be defined before c++20"
 # endif
 
+# ifdef __cpp_lib_senders
+#   error "__cpp_lib_senders should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_shared_mutex
 #   error "__cpp_lib_shared_mutex should not be defined before c++17"
 # endif
@@ -1261,6 +1291,10 @@
 #   error "__cpp_lib_constexpr_memory should not be defined before c++20"
 # endif
 
+# ifdef __cpp_lib_constexpr_new
+#   error "__cpp_lib_constexpr_new should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_constexpr_numeric
 #   error "__cpp_lib_constexpr_numeric should not be defined before c++20"
 # endif
@@ -1451,6 +1485,10 @@
 #   error "__cpp_lib_incomplete_container_elements should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_inplace_vector
+#   error "__cpp_lib_inplace_vector should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_int_pow2
 #   error "__cpp_lib_int_pow2 should not be defined before c++20"
 # endif
@@ -1535,6 +1573,10 @@
 #   error "__cpp_lib_is_swappable should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_is_virtual_base_of
+#   error "__cpp_lib_is_virtual_base_of should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_is_within_lifetime
 #   error "__cpp_lib_is_within_lifetime should not be defined before c++26"
 # endif
@@ -1636,6 +1678,10 @@
 #   error "__cpp_lib_optional should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_optional_range_support
+#   error "__cpp_lib_optional_range_support should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_out_ptr
 #   error "__cpp_lib_out_ptr should not be defined before c++23"
 # endif
@@ -1644,6 +1690,10 @@
 #   error "__cpp_lib_parallel_algorithm should not be defined before c++17"
 # endif
 
+# ifdef __cpp_lib_philox_engine
+#   error "__cpp_lib_philox_engine should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_polymorphic_allocator
 #   error "__cpp_lib_polymorphic_allocator should not be defined before c++20"
 # endif
@@ -1775,6 +1825,10 @@
 #   error "__cpp_lib_semaphore should not be defined before c++20"
 # endif
 
+# ifdef __cpp_lib_senders
+#   error "__cpp_lib_senders should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_shared_mutex
 #   error "__cpp_lib_shared_mutex should not be defined before c++17"
 # endif
@@ -2199,6 +2253,10 @@
 #   error "__cpp_lib_constexpr_memory should not be defined before c++20"
 # endif
 
+# ifdef __cpp_lib_constexpr_new
+#   error "__cpp_lib_constexpr_new should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_constexpr_numeric
 #   error "__cpp_lib_constexpr_numeric should not be defined before c++20"
 # endif
@@ -2431,6 +2489,10 @@
 #   error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++17"
 # endif
 
+# ifdef __cpp_lib_inplace_vector
+#   error "__cpp_lib_inplace_vector should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_int_pow2
 #   error "__cpp_lib_int_pow2 should not be defined before c++20"
 # endif
@@ -2527,6 +2589,10 @@
 #   error "__cpp_lib_is_swappable should have the value 201603L in c++17"
 # endif
 
+# ifdef __cpp_lib_is_virtual_base_of
+#   error "__cpp_lib_is_virtual_base_of should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_is_within_lifetime
 #   error "__cpp_lib_is_within_lifetime should not be defined before c++26"
 # endif
@@ -2670,6 +2736,10 @@
 #   error "__cpp_lib_optional should have the value 201606L in c++17"
 # endif
 
+# ifdef __cpp_lib_optional_range_support
+#   error "__cpp_lib_optional_range_support should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_out_ptr
 #   error "__cpp_lib_out_ptr should not be defined before c++23"
 # endif
@@ -2687,6 +2757,10 @@
 #   endif
 # endif
 
+# ifdef __cpp_lib_philox_engine
+#   error "__cpp_lib_philox_engine should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_polymorphic_allocator
 #   error "__cpp_lib_polymorphic_allocator should not be defined before c++20"
 # endif
@@ -2833,6 +2907,10 @@
 #   error "__cpp_lib_semaphore should not be defined before c++20"
 # endif
 
+# ifdef __cpp_lib_senders
+#   error "__cpp_lib_senders should not be defined before c++26"
+# endif
+
 # if !defined(_LIBCPP_HAS_NO_THREADS)
 #   ifndef __cpp_lib_shared_mutex
 #     error "__cpp_lib_shared_mutex should be defined in c++17"
@@ -3398,6 +3476,10 @@
 #   error "__cpp_lib_constexpr_memory should have the value 201811L in c++20"
 # endif
 
+# ifdef __cpp_lib_constexpr_new
+#   error "__cpp_lib_constexpr_new should not be defined before c++26"
+# endif
+
 # ifndef __cpp_lib_constexpr_numeric
 #   error "__cpp_lib_constexpr_numeric should be defined in c++20"
 # endif
@@ -3681,6 +3763,10 @@
 #   error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++20"
 # endif
 
+# ifdef __cpp_lib_inplace_vector
+#   error "__cpp_lib_inplace_vector should not be defined before c++26"
+# endif
+
 # ifndef __cpp_lib_int_pow2
 #   error "__cpp_lib_int_pow2 should be defined in c++20"
 # endif
@@ -3810,6 +3896,10 @@
 #   error "__cpp_lib_is_swappable should have the value 201603L in c++20"
 # endif
 
+# ifdef __cpp_lib_is_virtual_base_of
+#   error "__cpp_lib_is_virtual_base_of should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_is_within_lifetime
 #   error "__cpp_lib_is_within_lifetime should not be defined before c++26"
 # endif
@@ -3980,6 +4070,10 @@
 #   error "__cpp_lib_optional should have the value 201606L in c++20"
 # endif
 
+# ifdef __cpp_lib_optional_range_support
+#   error "__cpp_lib_optional_range_support should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_out_ptr
 #   error "__cpp_lib_out_ptr should not be defined before c++23"
 # endif
@@ -3997,6 +4091,10 @@
 #   endif
 # endif
 
+# ifdef __cpp_lib_philox_engine
+#   error "__cpp_lib_philox_engine should not be defined before c++26"
+# endif
+
 # if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_PMR
 #   ifndef __cpp_lib_polymorphic_allocator
 #     error "__cpp_lib_polymorphic_allocator should be defined in c++20"
@@ -4167,6 +4265,10 @@
 #   endif
 # endif
 
+# ifdef __cpp_lib_senders
+#   error "__cpp_lib_senders should not be defined before c++26"
+# endif
+
 # if !defined(_LIBCPP_HAS_NO_THREADS)
 #   ifndef __cpp_lib_shared_mutex
 #     error "__cpp_lib_shared_mutex should be defined in c++20"
@@ -4816,6 +4918,10 @@
 #   error "__cpp_lib_constexpr_memory should have the value 202202L in c++23"
 # endif
 
+# ifdef __cpp_lib_constexpr_new
+#   error "__cpp_lib_constexpr_new should not be defined before c++26"
+# endif
+
 # ifndef __cpp_lib_constexpr_numeric
 #   error "__cpp_lib_constexpr_numeric should be defined in c++23"
 # endif
@@ -5123,6 +5229,10 @@
 #   error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++23"
 # endif
 
+# ifdef __cpp_lib_inplace_vector
+#   error "__cpp_lib_inplace_vector should not be defined before c++26"
+# endif
+
 # ifndef __cpp_lib_int_pow2
 #   error "__cpp_lib_int_pow2 should be defined in c++23"
 # endif
@@ -5261,6 +5371,10 @@
 #   error "__cpp_lib_is_swappable should have the value 201603L in c++23"
 # endif
 
+# ifdef __cpp_lib_is_virtual_base_of
+#   error "__cpp_lib_is_virtual_base_of should not be defined before c++26"
+# endif
+
 # ifdef __cpp_lib_is_within_lifetime
 #   error "__cpp_lib_is_within_lifetime should not be defined before c++26"
 # endif
@@ -5446,6 +5560,10 @@
 #   error "__cpp_lib_optional should have the value 202110L in c++23"
 # endif
 
+# ifdef __cpp_lib_optional_range_support
+#   error "__cpp_lib_optional_range_support should not be defined before c++26"
+# endif
+
 # if !defined(_LIBCPP_VERSION)
 #   ifndef __cpp_lib_out_ptr
 #     error "__cpp_lib_out_ptr should be defined in c++23"
@@ -5472,6 +5590,10 @@
 #   endif
 # endif
 
+# ifdef __cpp_lib_philox_engine
+#   error "__cpp_lib_philox_engine should not be defined before c++26"
+# endif
+
 # if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_PMR
 #   ifndef __cpp_lib_polymorphic_allocator
 #     error "__cpp_lib_polymorphic_allocator should be defined in c++23"
@@ -5726,6 +5848,10 @@
 #   endif
 # endif
 
+# ifdef __cpp_lib_senders
+#   error "__cpp_lib_senders should not be defined before c++26"
+# endif
+
 # if !defined(_LIBCPP_HAS_NO_THREADS)
 #   ifndef __cpp_lib_shared_mutex
 #     error "__cpp_lib_shared_mutex should be defined in c++23"
@@ -6438,6 +6564,19 @@
 #   error "__cpp_lib_constexpr_memory should have the value 202202L in c++26"
 # endif
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_constexpr_new
+#     error "__cpp_lib_constexpr_new should be defined in c++26"
+#   endif
+#   if __cpp_lib_constexpr_new != 202406L
+#     error "__cpp_lib_constexpr_new should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_constexpr_new
+#     error "__cpp_lib_constexpr_new should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 # ifndef __cpp_lib_constexpr_numeric
 #   error "__cpp_lib_constexpr_numeric should be defined in c++26"
 # endif
@@ -6898,6 +7037,19 @@
 #   error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++26"
 # endif
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_inplace_vector
+#     error "__cpp_lib_inplace_vector should be defined in c++26"
+#   endif
+#   if __cpp_lib_inplace_vector != 202406L
+#     error "__cpp_lib_inplace_vector should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_inplace_vector
+#     error "__cpp_lib_inplace_vector should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 # ifndef __cpp_lib_int_pow2
 #   error "__cpp_lib_int_pow2 should be defined in c++26"
 # endif
@@ -7036,6 +7188,19 @@
 #   error "__cpp_lib_is_swappable should have the value 201603L in c++26"
 # endif
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_is_virtual_base_of
+#     error "__cpp_lib_is_virtual_base_of should be defined in c++26"
+#   endif
+#   if __cpp_lib_is_virtual_base_of != 202406L
+#     error "__cpp_lib_is_virtual_base_of should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_is_virtual_base_of
+#     error "__cpp_lib_is_virtual_base_of should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 # if !defined(_LIBCPP_VERSION)
 #   ifndef __cpp_lib_is_within_lifetime
 #     error "__cpp_lib_is_within_lifetime should be defined in c++26"
@@ -7239,6 +7404,19 @@
 #   error "__cpp_lib_optional should have the value 202110L in c++26"
 # endif
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_optional_range_support
+#     error "__cpp_lib_optional_range_support should be defined in c++26"
+#   endif
+#   if __cpp_lib_optional_range_support != 202406L
+#     error "__cpp_lib_optional_range_support should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_optional_range_support
+#     error "__cpp_lib_optional_range_support should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 # if !defined(_LIBCPP_VERSION)
 #   ifndef __cpp_lib_out_ptr
 #     error "__cpp_lib_out_ptr should be defined in c++26"
@@ -7265,6 +7443,19 @@
 #   endif
 # endif
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_philox_engine
+#     error "__cpp_lib_philox_engine should be defined in c++26"
+#   endif
+#   if __cpp_lib_philox_engine != 202406L
+#     error "__cpp_lib_philox_engine should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_philox_engine
+#     error "__cpp_lib_philox_engine should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 # if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_PMR
 #   ifndef __cpp_lib_polymorphic_allocator
 #     error "__cpp_lib_polymorphic_allocator should be defined in c++26"
@@ -7546,6 +7737,19 @@
 #   endif
 # endif
 
+# if !defined(_LIBCPP_VERSION)
+#   ifndef __cpp_lib_senders
+#     error "__cpp_lib_senders should be defined in c++26"
+#   endif
+#   if __cpp_lib_senders != 202406L
+#     error "__cpp_lib_senders should have the value 202406L in c++26"
+#   endif
+# else // _LIBCPP_VERSION
+#   ifdef __cpp_lib_senders
+#     error "__cpp_lib_senders should not be defined because it is unimplemented in libc++!"
+#   endif
+# endif
+
 # if !defined(_LIBCPP_HAS_NO_THREADS)
 #   ifndef __cpp_lib_shared_mutex
 #     error "__cpp_lib_shared_mutex should be defined in c++26"
diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index 3f8ecc26321ee..d79892e140ebd 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -360,6 +360,12 @@ def add_version_header(tc):
             "values": {"c++20": 201811, "c++23": 202202},
             "headers": ["memory"],
         },
+        {
+            "name": "__cpp_lib_constexpr_new",
+            "values": {"c++26": 202406},  # P2747R2 constexpr placement new
+            "headers": ["new"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_constexpr_numeric",
             "values": {"c++20": 201911},
@@ -679,6 +685,12 @@ def add_version_header(tc):
             "values": {"c++17": 201505},
             "headers": ["forward_list", "list", "vector"],
         },
+        {
+            "name": "__cpp_lib_inplace_vector",
+            "values": {"c++26": 202406},  # P0843R14 inplace_vector
+            "headers": ["inplace_vector"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_int_pow2",
             "values": {"c++20": 202002},
@@ -771,6 +783,14 @@ def add_version_header(tc):
             "values": {"c++17": 201603},
             "headers": ["type_traits"],
         },
+        {
+            "name": "__cpp_lib_is_virtual_base_of",
+            "values": {
+                "c++26": 202406  # P2985R0 A type trait for detecting virtual base classes
+            },
+            "headers": ["type_traits"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_is_within_lifetime",
             # Note this name was changed from "__cpp_lib_within_lifetime" when the paper was adopted
@@ -851,7 +871,10 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_mdspan",
-            "values": {"c++23": 202207},
+            "values": {
+                "c++23": 202207,
+                # "c++26": 202406, # P2389R2 dextents Index Type Parameter
+            },
             "headers": ["mdspan"],
         },
         {
@@ -918,6 +941,12 @@ def add_version_header(tc):
             "values": {"c++17": 201606, "c++23": 202110},
             "headers": ["optional"],
         },
+        {
+            "name": "__cpp_lib_optional_range_support",
+            "values": {"c++26": 202406},  # P3168R2 Give std::optional Range Support
+            "headers": ["optional"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_out_ptr",
             "values": {
@@ -933,6 +962,15 @@ def add_version_header(tc):
             "headers": ["algorithm", "numeric"],
             "unimplemented": True,
         },
+        {
+            "name": "__cpp_lib_philox_engine",
+            "values": {
+                "c++26": 202406
+            },  # P2075R6 Philox as an extension of the C++ RNG engines
+            # Note the paper mentions 202310L as value, which differs from the typical procedure.
+            "headers": ["random"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_polymorphic_allocator",
             "values": {"c++20": 201902},
@@ -945,6 +983,7 @@ def add_version_header(tc):
             "values": {
                 "c++23": 202207,
                 # "c++26": 202403, # P3107R5: Permit an efficient implementation of std::print
+                # "c++26": 202406, # P3235R3 std::print more types faster with less memory
             },
             "headers": ["ostream", "print"],
         },
@@ -957,7 +996,10 @@ def add_version_header(tc):
         },
         {
             "name": "__cpp_lib_ranges",
-            "values": {"c++20": 202207},
+            "values": {
+                "c++20": 202207,
+                # "c++26": 202406, # P2997R1 Removing the common reference requirement from the indirectly invocable concepts
+            },
             "headers": ["algorithm", "functional", "iterator", "memory", "ranges"],
         },
         {
@@ -1103,6 +1145,12 @@ def add_version_header(tc):
             "test_suite_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && (!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_SYNC)",
             "libcxx_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC",
         },
+        {
+            "name": "__cpp_lib_senders",
+            "values": {"c++26": 202406},  # P2300R10 std::execution
+            "headers": ["execution"],
+            "unimplemented": True,
+        },
         {
             "name": "__cpp_lib_shared_mutex",
             "values": {"c++17": 201505},
diff --git a/libcxx/utils/libcxx/header_information.py b/libcxx/utils/libcxx/header_information.py
index e2165d6ab80b0..43abd05546fd9 100644
--- a/libcxx/utils/libcxx/header_information.py
+++ b/libcxx/utils/libcxx/header_information.py
@@ -139,10 +139,12 @@
 # modules will fail to build if a header is added but this list is not updated.
 headers_not_available = [
     "debugging",
+    "execution",
     "flat_map",
     "flat_set",
     "generator",
     "hazard_pointer",
+    "inplace_vector",
     "linalg",
     "rcu",
     "spanstream",



More information about the libcxx-commits mailing list