2025-01-28 19:48:43 -08:00
===========================================
Libc++ 21.0.0 (In-Progress) Release Notes
===========================================
.. contents ::
:local:
:depth: 2
Written by the `Libc++ Team <https://libcxx.llvm.org> `_
.. warning ::
These are in-progress notes for the upcoming libc++ 20.0.0 release.
Release notes for previous releases can be found on
`the Download Page <https://releases.llvm.org/download.html> `_ .
Introduction
============
This document contains the release notes for the libc++ C++ Standard Library,
part of the LLVM Compiler Infrastructure, release 20.0.0. Here we describe the
status of libc++ in some detail, including major improvements from the previous
release and new feature work. For the general LLVM release notes, see `the LLVM
documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM releases may
be downloaded from the `LLVM releases web site <https://llvm.org/releases/> `_ .
For more information about libc++, please see the `Libc++ Web Site
<https://libcxx.llvm.org> `_ or the `LLVM Web Site <https://llvm.org> `_ .
Note that if you are reading this file from a Git checkout or the
main Libc++ web page, this document applies to the *next* release, not
the current one. To see the release notes for a specific release, please
see the `releases page <https://llvm.org/releases/> `_ .
What's New in Libc++ 21.0.0?
==============================
Implemented Papers
------------------
2025-01-30 21:10:56 +01:00
- N4258: Cleaning-up noexcept in the Library (`Github <https://github.com/llvm/llvm-project/issues/99937> `__ )
2025-03-07 16:02:57 +08:00
- P0767R1: Deprecate POD (`Github <https://github.com/llvm/llvm-project/issues/104013> `__ )
2025-02-21 17:50:01 +01:00
- P1361R2: Integration of chrono with text formatting (`Github <https://github.com/llvm/llvm-project/issues/100014> `__ )
2025-03-09 00:52:51 +02:00
- P2255R2: A type trait to detect reference binding to temporary (implemented the type traits only) (`Github <https://github.com/llvm/llvm-project/issues/105180> `__ )
2025-03-21 07:33:52 +08:00
- P2562R1: `` constexpr `` Stable Sorting (`Github <https://github.com/llvm/llvm-project/issues/105360> `__ )
2025-03-25 18:31:57 +01:00
- P0472R3: Put std::monostate in <utility> (`Github <https://github.com/llvm/llvm-project/issues/127874> `__ )
2025-04-06 10:50:55 +01:00
- P1222R4: A Standard `` flat_set `` (`Github <https://github.com/llvm/llvm-project/issues/105193> `__ )
2025-04-09 07:40:01 +08:00
- P3247R2: Deprecate the notion of trivial types (`Github <https://github.com/llvm/llvm-project/issues/118387> `__ )
2025-01-28 19:48:43 -08:00
Improvements and New Features
-----------------------------
2025-03-13 14:07:23 -04:00
- The `` std::ranges::{copy, copy_n, copy_backward, move, move_backward, rotate} `` algorithms have been optimized for
2025-02-19 11:36:45 -05:00
`` std::vector<bool>::iterator `` , resulting in a performance improvement of up to 2000x.
2025-01-28 19:48:43 -08:00
2025-02-26 12:18:25 -05:00
- The `` std::ranges::equal `` algorithm has been optimized for `` std::vector<bool>::iterator `` , resulting in a performance
improvement of up to 188x.
2025-03-04 17:15:36 -05:00
- The `` std::ranges::swap_ranges `` algorithm has been optimized for `` std::vector<bool>::iterator `` , resulting in a
performance improvement of up to 611x.
2025-02-05 18:55:02 +01:00
- Updated formatting library to Unicode 16.0.0.
2025-01-28 19:48:43 -08:00
2025-04-11 15:35:58 +02:00
- The `` num_put::do_put `` integral overloads have been optimized, resulting in a performance improvement of up to 2.4x.
2025-01-28 19:48:43 -08:00
Deprecations and Removals
-------------------------
2025-03-07 16:02:57 +08:00
- `` std::is_pod `` and `` std::is_pod_v `` are deprecated in C++20 and later.
2025-04-09 07:40:01 +08:00
- `` std::is_trivial `` and `` std::is_trivial_v `` are deprecated in C++26 and later.
2025-04-11 15:35:58 +02:00
Potentially breaking changes
----------------------------
- The implementation of `` num_put::do_put `` has been replaced to improve the performance, which can lead to different
output when printing pointers.
2025-01-28 19:48:43 -08:00
Upcoming Deprecations and Removals
----------------------------------
2025-04-12 15:26:48 +02:00
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++.
- The `` _LIBCPP_VERBOSE_ABORT_NOT_NOEXCEPT `` macro will be removed in LLVM 21, making `` std::__libcpp_verbose_abort ``
unconditionally `` noexcept `` .
- Non-conforming extension `` packaged_task::result_type `` will be removed in LLVM 21.
2025-01-28 19:48:43 -08:00
LLVM 22
~~~~~~~
- TODO
ABI Affecting Changes
---------------------
2025-04-02 22:12:59 +02:00
- When using GCC, the `` std `` namespace is now annotated with `` [[gnu::visibility("default")]] `` . This may cause more
symbols to be exported from shared libraries when building with `` -fvisibility=hidden `` . This also fixes RTTI
comparison between shared libraries, since all RTTI has the correct visibility now. There is no behaviour change on
Clang.
2025-01-28 19:48:43 -08:00
Build System Changes
--------------------
- TODO