Skip to content

Commit e3dcddb

Browse files
wip
1 parent 1cc13ec commit e3dcddb

File tree

4 files changed

+88
-38
lines changed

4 files changed

+88
-38
lines changed

libcxx/docs/FeatureTestMacroTable.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ Status
198198
---------------------------------------------------------- -----------------
199199
``__cpp_lib_char8_t`` ``201907L``
200200
---------------------------------------------------------- -----------------
201+
``__cpp_lib_common_reference`` ``202302L``
202+
---------------------------------------------------------- -----------------
203+
``__cpp_lib_common_reference_wrapper`` ``202302L``
204+
---------------------------------------------------------- -----------------
201205
``__cpp_lib_concepts`` ``202002L``
202206
---------------------------------------------------------- -----------------
203207
``__cpp_lib_constexpr_algorithms`` ``201806L``
@@ -376,7 +380,7 @@ Status
376380
---------------------------------------------------------- -----------------
377381
``__cpp_lib_ranges_iota`` ``202202L``
378382
---------------------------------------------------------- -----------------
379-
``__cpp_lib_ranges_join_with`` *unimplemented*
383+
``__cpp_lib_ranges_join_with`` ``202202L``
380384
---------------------------------------------------------- -----------------
381385
``__cpp_lib_ranges_repeat`` ``202207L``
382386
---------------------------------------------------------- -----------------
@@ -414,6 +418,8 @@ Status
414418
---------------------------------------------------------- -----------------
415419
``__cpp_lib_atomic_min_max`` *unimplemented*
416420
---------------------------------------------------------- -----------------
421+
``__cpp_lib_atomic_ref`` ``202411L``
422+
---------------------------------------------------------- -----------------
417423
``__cpp_lib_bind_front`` ``202306L``
418424
---------------------------------------------------------- -----------------
419425
``__cpp_lib_bitset`` ``202306L``
@@ -430,7 +436,7 @@ Status
430436
---------------------------------------------------------- -----------------
431437
``__cpp_lib_constexpr_queue`` ``202502L``
432438
---------------------------------------------------------- -----------------
433-
``__cpp_lib_constrained_equality`` *unimplemented*
439+
``__cpp_lib_constrained_equality`` ``202411L``
434440
---------------------------------------------------------- -----------------
435441
``__cpp_lib_copyable_function`` *unimplemented*
436442
---------------------------------------------------------- -----------------
@@ -478,14 +484,16 @@ Status
478484
---------------------------------------------------------- -----------------
479485
``__cpp_lib_not_fn`` ``202306L``
480486
---------------------------------------------------------- -----------------
481-
``__cpp_lib_optional_range_support`` *unimplemented*
487+
``__cpp_lib_optional_range_support`` ``202406L``
482488
---------------------------------------------------------- -----------------
483489
``__cpp_lib_out_ptr`` ``202311L``
484490
---------------------------------------------------------- -----------------
485491
``__cpp_lib_philox_engine`` *unimplemented*
486492
---------------------------------------------------------- -----------------
487493
``__cpp_lib_ranges_concat`` *unimplemented*
488494
---------------------------------------------------------- -----------------
495+
``__cpp_lib_ranges_indices`` ``202506L``
496+
---------------------------------------------------------- -----------------
489497
``__cpp_lib_ratio`` ``202306L``
490498
---------------------------------------------------------- -----------------
491499
``__cpp_lib_rcu`` *unimplemented*
@@ -504,6 +512,8 @@ Status
504512
---------------------------------------------------------- -----------------
505513
``__cpp_lib_sstream_from_string_view`` ``202306L``
506514
---------------------------------------------------------- -----------------
515+
``__cpp_lib_string_subview`` ``202506L``
516+
---------------------------------------------------------- -----------------
507517
``__cpp_lib_string_view`` ``202403L``
508518
---------------------------------------------------------- -----------------
509519
``__cpp_lib_submdspan`` *unimplemented*

libcxx/docs/ReleaseNotes/22.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ Implemented Papers
4040

4141
- P2321R2: ``zip`` (`Github <https://llvm.org/PR105169>`__) (The paper is partially implemented. ``zip_transform_view``
4242
is implemented in this release)
43+
- P3044R2: sub-``string_view`` from ``string`` (`Github <https://llvm.org/PR148140>`__)
44+
- P3223R2: Making ``std::istream::ignore`` less surprising (`Github <https://llvm.org/PR148178>`__)
45+
- P3060R3: Add ``std::views::indices(n)`` (`Github <https://llvm.org/PR148175>`__)
46+
- P2835R7: Expose ``std::atomic_ref``'s object address (`Github <https://llvm.org/PR118377>`__)
4347
- P3168R2: Give ``std::optional`` Range Support (`Github <https://llvm.org/PR105430>`__)
4448
- P3372R3: ``constexpr map`` (`Github <https://llvm.org/PR134330>`__) (The paper is partially implemented. ``constexpr map`` is implemented in this release)
4549

@@ -64,6 +68,14 @@ Improvements and New Features
6468
- Multiple internal types have been refactored to use ``[[no_unique_address]]``, resulting in faster compile times and
6569
reduced debug information.
6670

71+
- The performance of ``std::find`` has been improved by up to 2x for integral types
72+
- The ``std::distance`` and ``std::ranges::distance`` algorithms have been optimized for segmented iterators (e.g.,
73+
``std::join_view`` iterators), reducing the complexity from ``O(n)`` to ``O(n / segment_size)``. Benchmarks show
74+
performance improvements of over 1600x in favorable cases with large segment sizes (e.g., 1024).
75+
- The ``std::{fill, fill_n}`` and ``std::ranges::{fill, fill_n}`` algorithms have been optimized for segmented iterators,
76+
resulting in a performance improvement of at least 10x for ``std::deque<int>`` iterators and
77+
``std::join_view<std::vector<std::vector<int>>>`` iterators.
78+
6779
Deprecations and Removals
6880
-------------------------
6981

libcxx/include/version

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ __cpp_lib_atomic_float 201711L <atomic>
3737
__cpp_lib_atomic_is_always_lock_free 201603L <atomic>
3838
__cpp_lib_atomic_lock_free_type_aliases 201907L <atomic>
3939
__cpp_lib_atomic_min_max 202403L <atomic>
40-
__cpp_lib_atomic_ref 201806L <atomic>
40+
__cpp_lib_atomic_ref 202411L <atomic>
41+
201806L // C++20
4142
__cpp_lib_atomic_shared_ptr 201711L <atomic>
4243
__cpp_lib_atomic_value_initialization 201911L <atomic> <memory>
4344
__cpp_lib_atomic_wait 201907L <atomic>
@@ -59,6 +60,8 @@ __cpp_lib_char8_t 201907L <atomic> <filesy
5960
__cpp_lib_chrono 201611L <chrono>
6061
__cpp_lib_chrono_udls 201304L <chrono>
6162
__cpp_lib_clamp 201603L <algorithm>
63+
__cpp_lib_common_reference 202302L <type_traits>
64+
__cpp_lib_common_reference_wrapper 202302L <functional>
6265
__cpp_lib_complex_udls 201309L <complex>
6366
__cpp_lib_concepts 202002L <concepts>
6467
__cpp_lib_constexpr_algorithms 202306L <algorithm> <utility>
@@ -84,8 +87,8 @@ __cpp_lib_constexpr_tuple 201811L <tuple>
8487
__cpp_lib_constexpr_typeinfo 202106L <typeinfo>
8588
__cpp_lib_constexpr_utility 201811L <utility>
8689
__cpp_lib_constexpr_vector 201907L <vector>
87-
__cpp_lib_constrained_equality 202403L <optional> <tuple> <utility>
88-
<variant>
90+
__cpp_lib_constrained_equality 202411L <expected> <optional> <tuple>
91+
<utility> <variant>
8992
__cpp_lib_containers_ranges 202202L <deque> <forward_list> <list>
9093
<map> <queue> <set>
9194
<stack> <string> <unordered_map>
@@ -204,6 +207,7 @@ __cpp_lib_ranges_chunk_by 202202L <ranges>
204207
__cpp_lib_ranges_concat 202403L <ranges>
205208
__cpp_lib_ranges_contains 202207L <algorithm>
206209
__cpp_lib_ranges_find_last 202207L <algorithm>
210+
__cpp_lib_ranges_indices 202506L <ranges>
207211
__cpp_lib_ranges_iota 202202L <numeric>
208212
__cpp_lib_ranges_join_with 202202L <ranges>
209213
__cpp_lib_ranges_repeat 202207L <ranges>
@@ -244,6 +248,7 @@ __cpp_lib_starts_ends_with 201711L <string> <string
244248
__cpp_lib_stdatomic_h 202011L <stdatomic.h>
245249
__cpp_lib_string_contains 202011L <string> <string_view>
246250
__cpp_lib_string_resize_and_overwrite 202110L <string>
251+
__cpp_lib_string_subview 202506L <string> <string_view>
247252
__cpp_lib_string_udls 201304L <string>
248253
__cpp_lib_string_view 202403L <string> <string_view>
249254
201803L // C++20
@@ -332,7 +337,7 @@ __cpp_lib_void_t 201411L <type_traits>
332337
# define __cpp_lib_clamp 201603L
333338
# define __cpp_lib_enable_shared_from_this 201603L
334339
// # define __cpp_lib_execution 201603L
335-
# if _LIBCPP_HAS_FILESYSTEM && _LIBCPP_AVAILABILITY_HAS_FILESYSTEM_LIBRARY
340+
# if _LIBCPP_HAS_FILESYSTEM
336341
# define __cpp_lib_filesystem 201703L
337342
# endif
338343
# define __cpp_lib_gcd_lcm 201606L
@@ -390,10 +395,8 @@ __cpp_lib_void_t 201411L <type_traits>
390395
# define __cpp_lib_atomic_ref 201806L
391396
// # define __cpp_lib_atomic_shared_ptr 201711L
392397
# define __cpp_lib_atomic_value_initialization 201911L
393-
# if _LIBCPP_AVAILABILITY_HAS_SYNC
394-
# define __cpp_lib_atomic_wait 201907L
395-
# endif
396-
# if _LIBCPP_HAS_THREADS && _LIBCPP_AVAILABILITY_HAS_SYNC
398+
# define __cpp_lib_atomic_wait 201907L
399+
# if _LIBCPP_HAS_THREADS
397400
# define __cpp_lib_barrier 201907L
398401
# endif
399402
# define __cpp_lib_bind_front 201907L
@@ -403,6 +406,8 @@ __cpp_lib_void_t 201411L <type_traits>
403406
# if _LIBCPP_HAS_CHAR8_T
404407
# define __cpp_lib_char8_t 201907L
405408
# endif
409+
# define __cpp_lib_common_reference 202302L
410+
# define __cpp_lib_common_reference_wrapper 202302L
406411
# define __cpp_lib_concepts 202002L
407412
# define __cpp_lib_constexpr_algorithms 201806L
408413
# define __cpp_lib_constexpr_complex 201711L
@@ -436,10 +441,10 @@ __cpp_lib_void_t 201411L <type_traits>
436441
// # define __cpp_lib_is_layout_compatible 201907L
437442
# define __cpp_lib_is_nothrow_convertible 201806L
438443
// # define __cpp_lib_is_pointer_interconvertible 201907L
439-
# if _LIBCPP_HAS_THREADS && _LIBCPP_AVAILABILITY_HAS_SYNC
444+
# if _LIBCPP_HAS_THREADS
440445
# define __cpp_lib_jthread 201911L
441446
# endif
442-
# if _LIBCPP_HAS_THREADS && _LIBCPP_AVAILABILITY_HAS_SYNC
447+
# if _LIBCPP_HAS_THREADS
443448
# define __cpp_lib_latch 201907L
444449
# endif
445450
# define __cpp_lib_list_remove_return_type 201806L
@@ -452,7 +457,7 @@ __cpp_lib_void_t 201411L <type_traits>
452457
# endif
453458
# define __cpp_lib_ranges 202110L
454459
# define __cpp_lib_remove_cvref 201711L
455-
# if _LIBCPP_HAS_THREADS && _LIBCPP_AVAILABILITY_HAS_SYNC
460+
# if _LIBCPP_HAS_THREADS
456461
# define __cpp_lib_semaphore 201907L
457462
# endif
458463
# undef __cpp_lib_shared_ptr_arrays
@@ -520,7 +525,7 @@ __cpp_lib_void_t 201411L <type_traits>
520525
# define __cpp_lib_ranges_contains 202207L
521526
# define __cpp_lib_ranges_find_last 202207L
522527
# define __cpp_lib_ranges_iota 202202L
523-
// # define __cpp_lib_ranges_join_with 202202L
528+
# define __cpp_lib_ranges_join_with 202202L
524529
# define __cpp_lib_ranges_repeat 202207L
525530
// # define __cpp_lib_ranges_slide 202202L
526531
# define __cpp_lib_ranges_starts_ends_with 202106L
@@ -541,6 +546,8 @@ __cpp_lib_void_t 201411L <type_traits>
541546
# define __cpp_lib_aligned_accessor 202411L
542547
// # define __cpp_lib_associative_heterogeneous_insertion 202306L
543548
// # define __cpp_lib_atomic_min_max 202403L
549+
# undef __cpp_lib_atomic_ref
550+
# define __cpp_lib_atomic_ref 202411L
544551
# undef __cpp_lib_bind_front
545552
# define __cpp_lib_bind_front 202306L
546553
# define __cpp_lib_bitset 202306L
@@ -553,7 +560,7 @@ __cpp_lib_void_t 201411L <type_traits>
553560
# define __cpp_lib_constexpr_new 202406L
554561
# endif
555562
# define __cpp_lib_constexpr_queue 202502L
556-
// # define __cpp_lib_constrained_equality 202403L
563+
# define __cpp_lib_constrained_equality 202411L
557564
// # define __cpp_lib_copyable_function 202306L
558565
// # define __cpp_lib_debugging 202311L
559566
// # define __cpp_lib_default_template_type_for_algorithm_values 202403L
@@ -583,11 +590,12 @@ __cpp_lib_void_t 201411L <type_traits>
583590
# define __cpp_lib_mdspan 202406L
584591
# undef __cpp_lib_not_fn
585592
# define __cpp_lib_not_fn 202306L
586-
// # define __cpp_lib_optional_range_support 202406L
593+
# define __cpp_lib_optional_range_support 202406L
587594
# undef __cpp_lib_out_ptr
588595
# define __cpp_lib_out_ptr 202311L
589596
// # define __cpp_lib_philox_engine 202406L
590597
// # define __cpp_lib_ranges_concat 202403L
598+
# define __cpp_lib_ranges_indices 202506L
591599
# define __cpp_lib_ratio 202306L
592600
// # define __cpp_lib_rcu 202306L
593601
# define __cpp_lib_reference_wrapper 202403L
@@ -597,6 +605,7 @@ __cpp_lib_void_t 201411L <type_traits>
597605
# define __cpp_lib_span_at 202311L
598606
# define __cpp_lib_span_initializer_list 202311L
599607
# define __cpp_lib_sstream_from_string_view 202306L
608+
# define __cpp_lib_string_subview 202506L
600609
# undef __cpp_lib_string_view
601610
# define __cpp_lib_string_view 202403L
602611
// # define __cpp_lib_submdspan 202306L

0 commit comments

Comments
 (0)