Skip to content

Commit 4f844b2

Browse files
JMazurkiewicztru
authored andcommitted
[libc++] Follow-up to "Poison Pills are Too Toxic"
* Update release notes and `Cxx23.html` * Update `__cpp_lib_ranges` feature test macro
1 parent d5498c3 commit 4f844b2

12 files changed

+40
-27
lines changed

libcxx/docs/FeatureTestMacroTable.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ Status
350350
---------------------------------------------------------- -----------------
351351
``__cpp_lib_print`` ``202207L``
352352
---------------------------------------------------------- -----------------
353+
``__cpp_lib_ranges`` ``202211L``
354+
---------------------------------------------------------- -----------------
353355
``__cpp_lib_ranges_as_const`` *unimplemented*
354356
---------------------------------------------------------- -----------------
355357
``__cpp_lib_ranges_as_rvalue`` ``202207L``

libcxx/docs/ReleaseNotes/19.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Implemented Papers
7474
- P0019R8 - ``std::atomic_ref``
7575
- P2389R2 - Alias template ``dims`` for the ``extents`` of ``mdspan``
7676
- P1223R5 - ``ranges::find_last()``, ``ranges::find_last_if()``, and ``ranges::find_last_if_not()``
77-
- P2602R2 - Poison Pills are Too Toxic
77+
- P2602R2 - Poison Pills are Too Toxic (as DR against C++20)
7878
- P1981R0 - Rename ``leap`` to ``leap_second``
7979
- P1982R0 - Rename ``link`` to ``time_zone_link``
8080

libcxx/docs/Status/Cxx23.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Paper Status
4444
.. [#note-P1413R3] P1413R3: ``std::aligned_storage_t`` and ``std::aligned_union_t`` are marked deprecated, but
4545
clang doesn't issue a diagnostic for deprecated using template declarations.
4646
.. [#note-P2520R0] P2520R0: Libc++ implemented this paper as a DR in C++20 as well.
47+
.. [#note-P2602R2] P2602R2: Libc++ implemented this paper as a DR in C++20 as well.
4748
.. [#note-P2711R1] P2711R1: ``join_with_view`` hasn't been done yet since this type isn't implemented yet.
4849
.. [#note-P2770R0] P2770R0: ``join_with_view`` hasn't been done yet since this type isn't implemented yet.
4950
.. [#note-P2693R1] P2693R1: The formatter for ``std::thread::id`` is implemented.

libcxx/docs/Status/Cxx23Papers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"`P2396R1 <https://wg21.link/P2396R1>`__","LWG", "Concurrency TS 2 fixes ", "November 2022","","","|concurrency TS|"
101101
"`P2505R5 <https://wg21.link/P2505R5>`__","LWG", "Monadic Functions for ``std::expected``", "November 2022","|Complete|","17.0",""
102102
"`P2539R4 <https://wg21.link/P2539R4>`__","LWG", "Should the output of ``std::print`` to a terminal be synchronized with the underlying stream?", "November 2022","|Complete|","18.0","|format|"
103-
"`P2602R2 <https://wg21.link/P2602R2>`__","LWG", "Poison Pills are Too Toxic", "November 2022","|Complete|","19.0","|ranges|"
103+
"`P2602R2 <https://wg21.link/P2602R2>`__","LWG", "Poison Pills are Too Toxic", "November 2022","|Complete| [#note-P2602R2]_","19.0","|ranges| |DR|"
104104
"`P2708R1 <https://wg21.link/P2708R1>`__","LWG", "No Further Fundamentals TSes", "November 2022","|Nothing to do|","",""
105105
"","","","","","",""
106106
"`P0290R4 <https://wg21.link/P0290R4>`__","LWG", "``apply()`` for ``synchronized_value<T>``","February 2023","","","|concurrency TS|"

libcxx/include/version

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ __cpp_lib_philox_engine 202406L <random>
182182
__cpp_lib_polymorphic_allocator 201902L <memory_resource>
183183
__cpp_lib_print 202207L <ostream> <print>
184184
__cpp_lib_quoted_string_io 201304L <iomanip>
185-
__cpp_lib_ranges 202207L <algorithm> <functional> <iterator>
185+
__cpp_lib_ranges 202211L <algorithm> <functional> <iterator>
186186
<memory> <ranges>
187+
202207L // C++20
187188
__cpp_lib_ranges_as_const 202207L <ranges>
188189
__cpp_lib_ranges_as_rvalue 202207L <ranges>
189190
__cpp_lib_ranges_chunk 202202L <ranges>
@@ -480,6 +481,8 @@ __cpp_lib_void_t 201411L <type_traits>
480481
# define __cpp_lib_optional 202110L
481482
# define __cpp_lib_out_ptr 202106L
482483
# define __cpp_lib_print 202207L
484+
# undef __cpp_lib_ranges
485+
# define __cpp_lib_ranges 202211L
483486
// # define __cpp_lib_ranges_as_const 202207L
484487
# define __cpp_lib_ranges_as_rvalue 202207L
485488
// # define __cpp_lib_ranges_chunk 202202L

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
__cpp_lib_freestanding_algorithm 202311L [C++26]
2323
__cpp_lib_parallel_algorithm 201603L [C++17]
2424
__cpp_lib_ranges 202207L [C++20]
25+
202211L [C++23]
2526
__cpp_lib_ranges_contains 202207L [C++23]
2627
__cpp_lib_ranges_find_last 202207L [C++23]
2728
__cpp_lib_ranges_starts_ends_with 202106L [C++23]
@@ -321,8 +322,8 @@
321322
# ifndef __cpp_lib_ranges
322323
# error "__cpp_lib_ranges should be defined in c++23"
323324
# endif
324-
# if __cpp_lib_ranges != 202207L
325-
# error "__cpp_lib_ranges should have the value 202207L in c++23"
325+
# if __cpp_lib_ranges != 202211L
326+
# error "__cpp_lib_ranges should have the value 202211L in c++23"
326327
# endif
327328

328329
# ifndef __cpp_lib_ranges_contains
@@ -425,8 +426,8 @@
425426
# ifndef __cpp_lib_ranges
426427
# error "__cpp_lib_ranges should be defined in c++26"
427428
# endif
428-
# if __cpp_lib_ranges != 202207L
429-
# error "__cpp_lib_ranges should have the value 202207L in c++26"
429+
# if __cpp_lib_ranges != 202211L
430+
# error "__cpp_lib_ranges should have the value 202211L in c++26"
430431
# endif
431432

432433
# ifndef __cpp_lib_ranges_contains

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
__cpp_lib_move_only_function 202110L [C++23]
2929
__cpp_lib_not_fn 201603L [C++17]
3030
__cpp_lib_ranges 202207L [C++20]
31+
202211L [C++23]
3132
__cpp_lib_reference_wrapper 202403L [C++26]
3233
__cpp_lib_result_of_sfinae 201210L [C++14]
3334
__cpp_lib_transparent_operators 201210L [C++14]
@@ -409,8 +410,8 @@
409410
# ifndef __cpp_lib_ranges
410411
# error "__cpp_lib_ranges should be defined in c++23"
411412
# endif
412-
# if __cpp_lib_ranges != 202207L
413-
# error "__cpp_lib_ranges should have the value 202207L in c++23"
413+
# if __cpp_lib_ranges != 202211L
414+
# error "__cpp_lib_ranges should have the value 202211L in c++23"
414415
# endif
415416

416417
# ifdef __cpp_lib_reference_wrapper
@@ -531,8 +532,8 @@
531532
# ifndef __cpp_lib_ranges
532533
# error "__cpp_lib_ranges should be defined in c++26"
533534
# endif
534-
# if __cpp_lib_ranges != 202207L
535-
# error "__cpp_lib_ranges should have the value 202207L in c++26"
535+
# if __cpp_lib_ranges != 202211L
536+
# error "__cpp_lib_ranges should have the value 202211L in c++26"
536537
# endif
537538

538539
# ifndef __cpp_lib_reference_wrapper

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
__cpp_lib_nonmember_container_access 201411L [C++17]
2525
__cpp_lib_null_iterators 201304L [C++14]
2626
__cpp_lib_ranges 202207L [C++20]
27+
202211L [C++23]
2728
__cpp_lib_ssize 201902L [C++20]
2829
*/
2930

@@ -255,8 +256,8 @@
255256
# ifndef __cpp_lib_ranges
256257
# error "__cpp_lib_ranges should be defined in c++23"
257258
# endif
258-
# if __cpp_lib_ranges != 202207L
259-
# error "__cpp_lib_ranges should have the value 202207L in c++23"
259+
# if __cpp_lib_ranges != 202211L
260+
# error "__cpp_lib_ranges should have the value 202211L in c++23"
260261
# endif
261262

262263
# ifndef __cpp_lib_ssize
@@ -313,8 +314,8 @@
313314
# ifndef __cpp_lib_ranges
314315
# error "__cpp_lib_ranges should be defined in c++26"
315316
# endif
316-
# if __cpp_lib_ranges != 202207L
317-
# error "__cpp_lib_ranges should have the value 202207L in c++26"
317+
# if __cpp_lib_ranges != 202211L
318+
# error "__cpp_lib_ranges should have the value 202211L in c++26"
318319
# endif
319320

320321
# ifndef __cpp_lib_ssize

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
__cpp_lib_out_ptr 202106L [C++23]
3030
202311L [C++26]
3131
__cpp_lib_ranges 202207L [C++20]
32+
202211L [C++23]
3233
__cpp_lib_raw_memory_algorithms 201606L [C++17]
3334
__cpp_lib_shared_ptr_arrays 201611L [C++17]
3435
201707L [C++20]
@@ -495,8 +496,8 @@
495496
# ifndef __cpp_lib_ranges
496497
# error "__cpp_lib_ranges should be defined in c++23"
497498
# endif
498-
# if __cpp_lib_ranges != 202207L
499-
# error "__cpp_lib_ranges should have the value 202207L in c++23"
499+
# if __cpp_lib_ranges != 202211L
500+
# error "__cpp_lib_ranges should have the value 202211L in c++23"
500501
# endif
501502

502503
# ifndef __cpp_lib_raw_memory_algorithms
@@ -626,8 +627,8 @@
626627
# ifndef __cpp_lib_ranges
627628
# error "__cpp_lib_ranges should be defined in c++26"
628629
# endif
629-
# if __cpp_lib_ranges != 202207L
630-
# error "__cpp_lib_ranges should have the value 202207L in c++26"
630+
# if __cpp_lib_ranges != 202211L
631+
# error "__cpp_lib_ranges should have the value 202211L in c++26"
631632
# endif
632633

633634
# ifndef __cpp_lib_raw_memory_algorithms

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/* Constant Value
1919
__cpp_lib_default_template_type_for_algorithm_values 202403L [C++26]
2020
__cpp_lib_ranges 202207L [C++20]
21+
202211L [C++23]
2122
__cpp_lib_ranges_as_const 202207L [C++23]
2223
__cpp_lib_ranges_as_rvalue 202207L [C++23]
2324
__cpp_lib_ranges_chunk 202202L [C++23]
@@ -245,8 +246,8 @@
245246
# ifndef __cpp_lib_ranges
246247
# error "__cpp_lib_ranges should be defined in c++23"
247248
# endif
248-
# if __cpp_lib_ranges != 202207L
249-
# error "__cpp_lib_ranges should have the value 202207L in c++23"
249+
# if __cpp_lib_ranges != 202211L
250+
# error "__cpp_lib_ranges should have the value 202211L in c++23"
250251
# endif
251252

252253
# if !defined(_LIBCPP_VERSION)
@@ -364,8 +365,8 @@
364365
# ifndef __cpp_lib_ranges
365366
# error "__cpp_lib_ranges should be defined in c++26"
366367
# endif
367-
# if __cpp_lib_ranges != 202207L
368-
# error "__cpp_lib_ranges should have the value 202207L in c++26"
368+
# if __cpp_lib_ranges != 202211L
369+
# error "__cpp_lib_ranges should have the value 202211L in c++26"
369370
# endif
370371

371372
# if !defined(_LIBCPP_VERSION)

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
__cpp_lib_print 202207L [C++23]
168168
__cpp_lib_quoted_string_io 201304L [C++14]
169169
__cpp_lib_ranges 202207L [C++20]
170+
202211L [C++23]
170171
__cpp_lib_ranges_as_const 202207L [C++23]
171172
__cpp_lib_ranges_as_rvalue 202207L [C++23]
172173
__cpp_lib_ranges_chunk 202202L [C++23]
@@ -5619,8 +5620,8 @@
56195620
# ifndef __cpp_lib_ranges
56205621
# error "__cpp_lib_ranges should be defined in c++23"
56215622
# endif
5622-
# if __cpp_lib_ranges != 202207L
5623-
# error "__cpp_lib_ranges should have the value 202207L in c++23"
5623+
# if __cpp_lib_ranges != 202211L
5624+
# error "__cpp_lib_ranges should have the value 202211L in c++23"
56245625
# endif
56255626

56265627
# if !defined(_LIBCPP_VERSION)
@@ -7470,8 +7471,8 @@
74707471
# ifndef __cpp_lib_ranges
74717472
# error "__cpp_lib_ranges should be defined in c++26"
74727473
# endif
7473-
# if __cpp_lib_ranges != 202207L
7474-
# error "__cpp_lib_ranges should have the value 202207L in c++26"
7474+
# if __cpp_lib_ranges != 202211L
7475+
# error "__cpp_lib_ranges should have the value 202211L in c++26"
74757476
# endif
74767477

74777478
# if !defined(_LIBCPP_VERSION)

libcxx/utils/generate_feature_test_macro_components.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,7 @@ def add_version_header(tc):
992992
"name": "__cpp_lib_ranges",
993993
"values": {
994994
"c++20": 202207,
995+
"c++23": 202211, # P2602R2 Poison Pills are Too Toxic
995996
# "c++23": 202302, # Relaxing Ranges Just A Smidge
996997
# "c++26": 202406, # P2997R1 Removing the common reference requirement from the indirectly invocable concepts (already implemented as a DR)
997998
},

0 commit comments

Comments
 (0)