From 2df1cec9db73697a04e733de39ab9ac63c7b2d9b Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Tue, 23 Jul 2024 18:59:23 +0200 Subject: [PATCH] [libc++][doc] Update the release notes for LLVM 19. (#99061) This is a preparation for the upcoming LLVM 19 release. --- libcxx/docs/ReleaseNotes/19.rst | 47 ++++++++++++++++++++++++------ libcxx/docs/ReleaseNotes/20.rst | 14 ++++++++- libcxx/docs/Status/SpecialMath.rst | 2 +- 3 files changed, 52 insertions(+), 11 deletions(-) diff --git a/libcxx/docs/ReleaseNotes/19.rst b/libcxx/docs/ReleaseNotes/19.rst index 439f552db59a82..c2c2bfbed4ac31 100644 --- a/libcxx/docs/ReleaseNotes/19.rst +++ b/libcxx/docs/ReleaseNotes/19.rst @@ -35,6 +35,20 @@ see the `releases page `_. What's New in Libc++ 19.0.0? ============================== +The main focus of the libc++ team has been to implement new C++20, C++23, +and C++26 features. + +Experimental support for the time zone database has progressed. + +Work on the ranges support has progressed. See +:ref:`ranges-status` for the current status. + +Work on the experimental C++17 Parallel STL has progressed. See +:ref:`pstl-status` for the current status. + +Work on the C++17 mathematical special functions has started. See +:ref:`special-math-status` for the current status. + Implemented Papers ------------------ @@ -59,14 +73,21 @@ Implemented Papers - P0019R8 - ``std::atomic_ref`` - P2389R2 - Alias template ``dims`` for the ``extents`` of ``mdspan`` - P1223R5 - ``ranges::find_last()``, ``ranges::find_last_if()``, and ``ranges::find_last_if_not()`` +- P2602R2 - Poison Pills are Too Toxic +- P1981R0 - Rename ``leap`` to ``leap_second`` +- P1982R0 - Rename ``link`` to ``time_zone_link`` + Improvements and New Features ----------------------------- - The performance of growing ``std::vector`` has been improved for trivially relocatable types. -- A lot of types are considered trivially relocatable now, including ``vector`` and ``string``. -- The performance of ``ranges::fill`` and ``ranges::fill_n`` has been improved for ``vector::iterator``\s, + +- A lot of types are considered trivially relocatable now, including ``std::vector`` and ``std::string``. + +- The performance of ``std::ranges::fill`` and ``std::ranges::fill_n`` has been improved for ``std::vector::iterator``\s, resulting in a performance increase of up to 1400x. + - The ``std::mismatch`` algorithm has been optimized for integral types, which can lead up to 40x performance improvements. @@ -74,7 +95,7 @@ Improvements and New Features up to 100x. - The ``std::set_intersection`` and ``std::ranges::set_intersection`` algorithms have been optimized to fast-forward over - contiguous ranges of non-matching values, reducing the number of comparisons from linear to + contiguous ranges of non-matching values, reducing the number of comparisons from linear to logarithmic growth with the number of elements in best-case scenarios. - The ``_LIBCPP_ENABLE_CXX26_REMOVED_STRSTREAM`` macro has been added to make the declarations in ```` available. @@ -101,15 +122,18 @@ Improvements and New Features Note: bounded iterators currently are not supported for ``vector``. +- In C++23 and C++26 the number of transitive includes in several headers has been reduced, improving the compilation speed. + + Deprecations and Removals ------------------------- -- The C++20 synchronization library (````, ````, ``atomic::wait``, etc.) has been deprecated +- The C++20 synchronization library (````, ````, ``std::atomic::wait``, etc.) has been deprecated in language modes prior to C++20. If you are using these features prior to C++20, please update to ``-std=c++20``. In LLVM 20, the C++20 synchronization library will be removed entirely in language modes prior to C++20. - ``_LIBCPP_DISABLE_NODISCARD_EXT`` has been removed. ``[[nodiscard]]`` applications are now unconditional. - This decision is based on LEWGs discussion on `P3122 ` and `P3162 ` + This decision is based on LEWGs discussion on `P3122 `_ and `P3162 `_ to not use ``[[nodiscard]]`` in the standard. - The ``LIBCXX_ENABLE_ASSERTIONS`` CMake variable that was used to enable the safe mode has been deprecated and setting @@ -151,10 +175,11 @@ Deprecations and Removals - libc++ no longer supports ``std::allocator`` and containers of ``const``-qualified element type, such as ``std::vector`` and ``std::list``. This used to be supported as an undocumented extension. If you were using ``std::vector``, replace it with ``std::vector`` instead. The - ``_LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST`` macro can be defined to temporarily re-enable this extension as - folks transition their code. This macro will be honored for one released and ignored starting in LLVM 20. + ``_LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST`` macro can be defined + to temporarily re-enable this extension to make it easier to update user code. + This macro will be honored for one released and ignored starting in LLVM 20. To assist with the clean-up process, consider running your code through Clang Tidy, with - `std-allocator-const ` + `std-allocator-const `_ enabled. - When configuring libc++ with localization or threads disabled, the library no longer emits an error when @@ -187,6 +212,9 @@ LLVM 20 ``_LIBCPP_ENABLE_REMOVED_WEEKDAY_RELATIONAL_OPERATORS`` macro that was used to re-enable this extension will be ignored in LLVM 20. +- The ``_LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST`` macro will no longer have an effect. + + LLVM 21 ~~~~~~~ @@ -197,6 +225,7 @@ LLVM 21 If you are using C++03 in your project, you should consider moving to a newer version of the Standard to get the most out of libc++. + ABI Affecting Changes --------------------- @@ -211,7 +240,7 @@ Build System Changes - The ``LIBCXX_EXECUTOR`` and ``LIBCXXABI_EXECUTOR`` CMake variables have been removed. Please set ``LIBCXX_TEST_PARAMS`` to ``executor=<...>`` instead. -- The Cmake variable ``LIBCXX_ENABLE_CLANG_TIDY`` has been removed. The build system has been changed +- The CMake variable ``LIBCXX_ENABLE_CLANG_TIDY`` has been removed. The build system has been changed to automatically detect the presence of ``clang-tidy`` and the required ``Clang`` libraries. - The CMake options ``LIBCXX_INSTALL_MODULES`` now defaults to ``ON``. diff --git a/libcxx/docs/ReleaseNotes/20.rst b/libcxx/docs/ReleaseNotes/20.rst index fb677b1667ddcf..f959c8829277e6 100644 --- a/libcxx/docs/ReleaseNotes/20.rst +++ b/libcxx/docs/ReleaseNotes/20.rst @@ -59,16 +59,28 @@ Deprecations and Removals ``_LIBCPP_ENABLE_REMOVED_WEEKDAY_RELATIONAL_OPERATORS`` macro that was used to re-enable this extension will be ignored in LLVM 20. +- TODO: The ``_LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST`` macro will no longer have an effect. Upcoming Deprecations and Removals ---------------------------------- -LLVM 21 +LLVM 20 ~~~~~~~ - TODO +LLVM 21 +~~~~~~~ + +- The status of the C++03 implementation will be frozen after the LLVM 21 release. This means that starting in LLVM 22, non-critical bug fixes may not be back-ported + to C++03, including LWG issues. C++03 is a legacy platform, where most projects are no longer actively maintained. To + reduce the amount of fixes required to keep such legacy projects compiling with up-to-date toolchains, libc++ will aim to freeze the status of the headers in C++03 mode to avoid unintended breaking changes. + See https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc for more details. + + If you are using C++03 in your project, you should consider moving to a newer version of the Standard to get the most out of libc++. + + ABI Affecting Changes --------------------- diff --git a/libcxx/docs/Status/SpecialMath.rst b/libcxx/docs/Status/SpecialMath.rst index fcc9f03e3ae649..46e5c97cdaab2c 100644 --- a/libcxx/docs/Status/SpecialMath.rst +++ b/libcxx/docs/Status/SpecialMath.rst @@ -1,4 +1,4 @@ -.. special-math-status: +.. _special-math-status: ====================================================== libc++ Mathematical Special Functions Status (P0226R1)