Skip to content

Commit 2dadf8d

Browse files
authored
[libc++] Update status after the St. Louis meeting. (llvm#97951)
This updates: - The status tables - Feature test macros - New headers for modules
1 parent 09a275e commit 2dadf8d

15 files changed

+488
-8
lines changed

libcxx/docs/FeatureTestMacroTable.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,8 @@ Status
402402
---------------------------------------------------------- -----------------
403403
``__cpp_lib_bitset`` ``202306L``
404404
---------------------------------------------------------- -----------------
405+
``__cpp_lib_constexpr_new`` *unimplemented*
406+
---------------------------------------------------------- -----------------
405407
``__cpp_lib_constrained_equality`` *unimplemented*
406408
---------------------------------------------------------- -----------------
407409
``__cpp_lib_copyable_function`` *unimplemented*
@@ -436,12 +438,20 @@ Status
436438
---------------------------------------------------------- -----------------
437439
``__cpp_lib_hazard_pointer`` *unimplemented*
438440
---------------------------------------------------------- -----------------
441+
``__cpp_lib_inplace_vector`` *unimplemented*
442+
---------------------------------------------------------- -----------------
443+
``__cpp_lib_is_virtual_base_of`` *unimplemented*
444+
---------------------------------------------------------- -----------------
439445
``__cpp_lib_is_within_lifetime`` *unimplemented*
440446
---------------------------------------------------------- -----------------
441447
``__cpp_lib_linalg`` *unimplemented*
442448
---------------------------------------------------------- -----------------
449+
``__cpp_lib_optional_range_support`` *unimplemented*
450+
---------------------------------------------------------- -----------------
443451
``__cpp_lib_out_ptr`` *unimplemented*
444452
---------------------------------------------------------- -----------------
453+
``__cpp_lib_philox_engine`` *unimplemented*
454+
---------------------------------------------------------- -----------------
445455
``__cpp_lib_ranges_concat`` *unimplemented*
446456
---------------------------------------------------------- -----------------
447457
``__cpp_lib_ratio`` ``202306L``
@@ -452,6 +462,8 @@ Status
452462
---------------------------------------------------------- -----------------
453463
``__cpp_lib_saturation_arithmetic`` ``202311L``
454464
---------------------------------------------------------- -----------------
465+
``__cpp_lib_senders`` *unimplemented*
466+
---------------------------------------------------------- -----------------
455467
``__cpp_lib_smart_ptr_owner_equality`` *unimplemented*
456468
---------------------------------------------------------- -----------------
457469
``__cpp_lib_span_at`` ``202311L``

libcxx/docs/Status/Cxx2c.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Paper Status
4242
.. [#note-P2510R3] This paper is applied as DR against C++20. (MSVC STL and libstdc++ will do the same.)
4343
.. [#note-P3142R0] This paper is applied as DR against C++23. (MSVC STL and libstdc++ will do the same.)
4444
.. [#note-P2944R3] Implemented comparisons for ``reference_wrapper`` only.
45+
.. [#note-P2422R1] Libc++ keeps the ``nodiscard`` attributes as a conforming extension.
4546
4647
.. _issues-status-cxx2c:
4748

libcxx/docs/Status/Cxx2cIssues.csv

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,20 @@
6262
"`4053 <https://wg21.link/LWG4053>`__","Unary call to ``std::views::repeat`` does not decay the argument","Tokyo March 2024","|Complete|","19.0","|ranges|"
6363
"`4054 <https://wg21.link/LWG4054>`__","Repeating a ``repeat_view`` should repeat the view","Tokyo March 2024","|Complete|","19.0","|ranges|"
6464
"","","","","",""
65+
"`3944 <https://wg21.link/LWG3944>`__","Formatters converting sequences of ``char`` to sequences of ``wchar_t``","St. Louis June 2024","","","|format|"
66+
"`4060 <https://wg21.link/LWG4060>`__","``submdspan`` preconditions do not forbid creating invalid pointer","St. Louis June 2024","","",""
67+
"`4061 <https://wg21.link/LWG4061>`__","Should ``std::basic_format_context`` be default-constructible/copyable/movable?","St. Louis June 2024","","","|format|"
68+
"`4071 <https://wg21.link/LWG4071>`__","``reference_wrapper`` comparisons are not SFINAE-friendly","St. Louis June 2024","|Complete|","19.0",""
69+
"`4074 <https://wg21.link/LWG4074>`__","``compatible-joinable-ranges`` is underconstrained","St. Louis June 2024","","","|ranges|"
70+
"`4076 <https://wg21.link/LWG4076>`__","``concat_view`` should be freestanding","St. Louis June 2024","","",""
71+
"`4079 <https://wg21.link/LWG4079>`__","Missing Preconditions in ``concat_view::iterator``\`s conversion constructor","St. Louis June 2024","","","|ranges|"
72+
"`4082 <https://wg21.link/LWG4082>`__","``views::concat(r)`` is well-formed when ``r`` is an ``output_range``","St. Louis June 2024","","","|ranges|"
73+
"`4083 <https://wg21.link/LWG4083>`__","``views::as_rvalue`` should reject non-input ranges","St. Louis June 2024","","","|ranges|"
74+
"`4096 <https://wg21.link/LWG4096>`__","``views::iota(views::iota(0))`` should be rejected","St. Louis June 2024","","","|ranges|"
75+
"`4098 <https://wg21.link/LWG4098>`__","``views::adjacent<0>`` should reject non-forward ranges","St. Louis June 2024","","","|ranges|"
76+
"`4105 <https://wg21.link/LWG4105>`__","``ranges::ends_with``\`s Returns misses difference casting","St. Louis June 2024","","","|ranges|"
77+
"`4106 <https://wg21.link/LWG4106>`__","``basic_format_args`` should not be default-constructible","St. Louis June 2024","","","|format|"
78+
"","","","","",""
6579
"`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",""
6680
"XXXX","","The sys_info range should be affected by save","Not Yet Adopted","|Complete|","19.0"
67-
"`4071 <https://wg21.link/LWG4071>`__","","``reference_wrapper`` comparisons are not SFINAE-friendly","Not Yet Adopted","|Complete|","19.0"
6881
"","","","","",""

libcxx/docs/Status/Cxx2cPapers.csv

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,16 @@
6363
"`P2642R6 <https://wg21.link/P2642R6>`__","LWG","Padded ``mdspan`` layouts","Tokyo March 2024","","",""
6464
"`P3029R1 <https://wg21.link/P3029R1>`__","LWG","Better ``mdspan``'s CTAD","Tokyo March 2024","|Complete|","19.0",""
6565
"","","","","","",""
66+
"`P2747R2 <https://wg21.link/P2747R2>`__","CWG","``constexpr`` placement new","St. Louis June 2024","","",""
67+
"`P2997R1 <https://wg21.link/P2997R1>`__","LWG","Removing the common reference requirement from the indirectly invocable concepts","St. Louis June 2024","","",""
68+
"`P2389R2 <https://wg21.link/P2389R2>`__","LWG","``dextents`` Index Type Parameter","St. Louis June 2024","","",""
69+
"`P3168R2 <https://wg21.link/P3168R2>`__","LWG","Give ``std::optional`` Range Support","St. Louis June 2024","","","|ranges|"
70+
"`P3217R0 <https://wg21.link/P3217R0>`__","LWG","Adjoints to 'Enabling list-initialization for algorithms': find_last","St. Louis June 2024","","",""
71+
"`P2985R0 <https://wg21.link/P2985R0>`__","LWG","A type trait for detecting virtual base classes","St. Louis June 2024","","",""
72+
"`P0843R14 <https://wg21.link/P0843R14>`__","LWG","``inplace_vector``","St. Louis June 2024","","",""
73+
"`P3235R3 <https://wg21.link/P3235R3>`__","LWG","``std::print`` more types faster with less memory","St. Louis June 2024","","","|format| |DR|"
74+
"`P2968R2 <https://wg21.link/P2968R2>`__","LWG","Make ``std::ignore`` a first-class object","St. Louis June 2024","","",""
75+
"`P2075R6 <https://wg21.link/P2075R6>`__","LWG","Philox as an extension of the C++ RNG engines","St. Louis June 2024","","",""
76+
"`P2422R1 <https://wg21.link/P2422R1>`__","LWG","Remove ``nodiscard`` annotations from the standard library specification","St. Louis June 2024","|Complete| [#note-P2422R1]_","19.0",""
77+
"`P2300R10 <https://wg21.link/P2300R10>`__","LWG","``std::execution``","St. Louis June 2024","","",""
78+
"","","","","","",""

libcxx/include/version

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ __cpp_lib_constexpr_functional 201907L <functional>
7070
__cpp_lib_constexpr_iterator 201811L <iterator>
7171
__cpp_lib_constexpr_memory 202202L <memory>
7272
201811L // C++20
73+
__cpp_lib_constexpr_new 202406L <new>
7374
__cpp_lib_constexpr_numeric 201911L <numeric>
7475
__cpp_lib_constexpr_string 201907L <string>
7576
__cpp_lib_constexpr_string_view 201811L <string_view>
@@ -125,6 +126,7 @@ __cpp_lib_has_unique_object_representations 201606L <type_traits>
125126
__cpp_lib_hazard_pointer 202306L <hazard_pointer>
126127
__cpp_lib_hypot 201603L <cmath>
127128
__cpp_lib_incomplete_container_elements 201505L <forward_list> <list> <vector>
129+
__cpp_lib_inplace_vector 202406L <inplace_vector>
128130
__cpp_lib_int_pow2 202002L <bit>
129131
__cpp_lib_integer_comparison_functions 202002L <utility>
130132
__cpp_lib_integer_sequence 201304L <utility>
@@ -143,6 +145,7 @@ __cpp_lib_is_null_pointer 201309L <type_traits>
143145
__cpp_lib_is_pointer_interconvertible 201907L <type_traits>
144146
__cpp_lib_is_scoped_enum 202011L <type_traits>
145147
__cpp_lib_is_swappable 201603L <type_traits>
148+
__cpp_lib_is_virtual_base_of 202406L <type_traits>
146149
__cpp_lib_is_within_lifetime 202306L <type_traits>
147150
__cpp_lib_jthread 201911L <stop_token> <thread>
148151
__cpp_lib_latch 201907L <latch>
@@ -170,9 +173,11 @@ __cpp_lib_not_fn 201603L <functional>
170173
__cpp_lib_null_iterators 201304L <iterator>
171174
__cpp_lib_optional 202110L <optional>
172175
201606L // C++17
176+
__cpp_lib_optional_range_support 202406L <optional>
173177
__cpp_lib_out_ptr 202311L <memory>
174178
202106L // C++23
175179
__cpp_lib_parallel_algorithm 201603L <algorithm> <numeric>
180+
__cpp_lib_philox_engine 202406L <random>
176181
__cpp_lib_polymorphic_allocator 201902L <memory_resource>
177182
__cpp_lib_print 202207L <ostream> <print>
178183
__cpp_lib_quoted_string_io 201304L <iomanip>
@@ -203,6 +208,7 @@ __cpp_lib_sample 201603L <algorithm>
203208
__cpp_lib_saturation_arithmetic 202311L <numeric>
204209
__cpp_lib_scoped_lock 201703L <mutex>
205210
__cpp_lib_semaphore 201907L <semaphore>
211+
__cpp_lib_senders 202406L <execution>
206212
__cpp_lib_shared_mutex 201505L <shared_mutex>
207213
__cpp_lib_shared_ptr_arrays 201707L <memory>
208214
201611L // C++17
@@ -500,6 +506,7 @@ __cpp_lib_void_t 201411L <type_traits>
500506
# undef __cpp_lib_bind_front
501507
# define __cpp_lib_bind_front 202306L
502508
# define __cpp_lib_bitset 202306L
509+
// # define __cpp_lib_constexpr_new 202406L
503510
// # define __cpp_lib_constrained_equality 202403L
504511
// # define __cpp_lib_copyable_function 202306L
505512
// # define __cpp_lib_debugging 202311L
@@ -519,15 +526,20 @@ __cpp_lib_void_t 201411L <type_traits>
519526
// # define __cpp_lib_function_ref 202306L
520527
// # define __cpp_lib_generate_random 202403L
521528
// # define __cpp_lib_hazard_pointer 202306L
529+
// # define __cpp_lib_inplace_vector 202406L
530+
// # define __cpp_lib_is_virtual_base_of 202406L
522531
// # define __cpp_lib_is_within_lifetime 202306L
523532
// # define __cpp_lib_linalg 202311L
533+
// # define __cpp_lib_optional_range_support 202406L
524534
# undef __cpp_lib_out_ptr
525535
// # define __cpp_lib_out_ptr 202311L
536+
// # define __cpp_lib_philox_engine 202406L
526537
// # define __cpp_lib_ranges_concat 202403L
527538
# define __cpp_lib_ratio 202306L
528539
// # define __cpp_lib_rcu 202306L
529540
# define __cpp_lib_reference_wrapper 202403L
530541
# define __cpp_lib_saturation_arithmetic 202311L
542+
// # define __cpp_lib_senders 202406L
531543
// # define __cpp_lib_smart_ptr_owner_equality 202306L
532544
# define __cpp_lib_span_at 202311L
533545
# define __cpp_lib_span_initializer_list 202311L

libcxx/modules/std.compat.cppm.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ module;
6969
# if __has_include(<hazard_pointer>)
7070
# error "please update the header information for <hazard_pointer> in headers_not_available in utils/libcxx/header_information.py"
7171
# endif // __has_include(<hazard_pointer>)
72+
# if __has_include(<inplace_vector>)
73+
# error "please update the header information for <inplace_vector> in headers_not_available in utils/libcxx/header_information.py"
74+
# endif // __has_include(<inplace_vector>)
7275
# if __has_include(<linalg>)
7376
# error "please update the header information for <linalg> in headers_not_available in utils/libcxx/header_information.py"
7477
# endif // __has_include(<linalg>)

libcxx/modules/std.cppm.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ module;
191191
# if __has_include(<hazard_pointer>)
192192
# error "please update the header information for <hazard_pointer> in headers_not_available in utils/libcxx/header_information.py"
193193
# endif // __has_include(<hazard_pointer>)
194+
# if __has_include(<inplace_vector>)
195+
# error "please update the header information for <inplace_vector> in headers_not_available in utils/libcxx/header_information.py"
196+
# endif // __has_include(<inplace_vector>)
194197
# if __has_include(<linalg>)
195198
# error "please update the header information for <linalg> in headers_not_available in utils/libcxx/header_information.py"
196199
# endif // __has_include(<linalg>)

libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/* Constant Value
1919
__cpp_lib_execution 201603L [C++17]
2020
201902L [C++20]
21+
__cpp_lib_senders 202406L [C++26]
2122
*/
2223

2324
#include <execution>
@@ -29,12 +30,20 @@
2930
# error "__cpp_lib_execution should not be defined before c++17"
3031
# endif
3132

33+
# ifdef __cpp_lib_senders
34+
# error "__cpp_lib_senders should not be defined before c++26"
35+
# endif
36+
3237
#elif TEST_STD_VER == 14
3338

3439
# ifdef __cpp_lib_execution
3540
# error "__cpp_lib_execution should not be defined before c++17"
3641
# endif
3742

43+
# ifdef __cpp_lib_senders
44+
# error "__cpp_lib_senders should not be defined before c++26"
45+
# endif
46+
3847
#elif TEST_STD_VER == 17
3948

4049
# if !defined(_LIBCPP_VERSION)
@@ -50,6 +59,10 @@
5059
# endif
5160
# endif
5261

62+
# ifdef __cpp_lib_senders
63+
# error "__cpp_lib_senders should not be defined before c++26"
64+
# endif
65+
5366
#elif TEST_STD_VER == 20
5467

5568
# if !defined(_LIBCPP_VERSION)
@@ -65,6 +78,10 @@
6578
# endif
6679
# endif
6780

81+
# ifdef __cpp_lib_senders
82+
# error "__cpp_lib_senders should not be defined before c++26"
83+
# endif
84+
6885
#elif TEST_STD_VER == 23
6986

7087
# if !defined(_LIBCPP_VERSION)
@@ -80,6 +97,10 @@
8097
# endif
8198
# endif
8299

100+
# ifdef __cpp_lib_senders
101+
# error "__cpp_lib_senders should not be defined before c++26"
102+
# endif
103+
83104
#elif TEST_STD_VER > 23
84105

85106
# if !defined(_LIBCPP_VERSION)
@@ -95,5 +116,18 @@
95116
# endif
96117
# endif
97118

119+
# if !defined(_LIBCPP_VERSION)
120+
# ifndef __cpp_lib_senders
121+
# error "__cpp_lib_senders should be defined in c++26"
122+
# endif
123+
# if __cpp_lib_senders != 202406L
124+
# error "__cpp_lib_senders should have the value 202406L in c++26"
125+
# endif
126+
# else // _LIBCPP_VERSION
127+
# ifdef __cpp_lib_senders
128+
# error "__cpp_lib_senders should not be defined because it is unimplemented in libc++!"
129+
# endif
130+
# endif
131+
98132
#endif // TEST_STD_VER > 23
99133

libcxx/test/std/language.support/support.limits/support.limits.general/new.version.compile.pass.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// Test the feature test macros defined by <new>
1717

1818
/* Constant Value
19+
__cpp_lib_constexpr_new 202406L [C++26]
1920
__cpp_lib_destroying_delete 201806L [C++20]
2021
__cpp_lib_hardware_interference_size 201703L [C++17]
2122
__cpp_lib_launder 201606L [C++17]
@@ -26,6 +27,10 @@
2627

2728
#if TEST_STD_VER < 14
2829

30+
# ifdef __cpp_lib_constexpr_new
31+
# error "__cpp_lib_constexpr_new should not be defined before c++26"
32+
# endif
33+
2934
# ifdef __cpp_lib_destroying_delete
3035
# error "__cpp_lib_destroying_delete should not be defined before c++20"
3136
# endif
@@ -40,6 +45,10 @@
4045

4146
#elif TEST_STD_VER == 14
4247

48+
# ifdef __cpp_lib_constexpr_new
49+
# error "__cpp_lib_constexpr_new should not be defined before c++26"
50+
# endif
51+
4352
# ifdef __cpp_lib_destroying_delete
4453
# error "__cpp_lib_destroying_delete should not be defined before c++20"
4554
# endif
@@ -54,6 +63,10 @@
5463

5564
#elif TEST_STD_VER == 17
5665

66+
# ifdef __cpp_lib_constexpr_new
67+
# error "__cpp_lib_constexpr_new should not be defined before c++26"
68+
# endif
69+
5770
# ifdef __cpp_lib_destroying_delete
5871
# error "__cpp_lib_destroying_delete should not be defined before c++20"
5972
# endif
@@ -80,6 +93,10 @@
8093

8194
#elif TEST_STD_VER == 20
8295

96+
# ifdef __cpp_lib_constexpr_new
97+
# error "__cpp_lib_constexpr_new should not be defined before c++26"
98+
# endif
99+
83100
# if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
84101
# ifndef __cpp_lib_destroying_delete
85102
# error "__cpp_lib_destroying_delete should be defined in c++20"
@@ -115,6 +132,10 @@
115132

116133
#elif TEST_STD_VER == 23
117134

135+
# ifdef __cpp_lib_constexpr_new
136+
# error "__cpp_lib_constexpr_new should not be defined before c++26"
137+
# endif
138+
118139
# if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
119140
# ifndef __cpp_lib_destroying_delete
120141
# error "__cpp_lib_destroying_delete should be defined in c++23"
@@ -150,6 +171,19 @@
150171

151172
#elif TEST_STD_VER > 23
152173

174+
# if !defined(_LIBCPP_VERSION)
175+
# ifndef __cpp_lib_constexpr_new
176+
# error "__cpp_lib_constexpr_new should be defined in c++26"
177+
# endif
178+
# if __cpp_lib_constexpr_new != 202406L
179+
# error "__cpp_lib_constexpr_new should have the value 202406L in c++26"
180+
# endif
181+
# else // _LIBCPP_VERSION
182+
# ifdef __cpp_lib_constexpr_new
183+
# error "__cpp_lib_constexpr_new should not be defined because it is unimplemented in libc++!"
184+
# endif
185+
# endif
186+
153187
# if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
154188
# ifndef __cpp_lib_destroying_delete
155189
# error "__cpp_lib_destroying_delete should be defined in c++26"

0 commit comments

Comments
 (0)