blob: 696275e8357126a467c88d28418ef87258b72278 [file] [log] [blame]
Hans Wennborg003a9982019-07-18 11:51:05 +00001=========================================
Hans Wennborg87aea3c2020-07-15 11:40:53 +02002Libc++ 12.0.0 (In-Progress) Release Notes
Hans Wennborg003a9982019-07-18 11:51:05 +00003=========================================
Louis Dionne42222072018-09-06 14:46:22 +00004
5.. contents::
6 :local:
7 :depth: 2
8
Hans Wennborg3329a842018-09-10 08:57:12 +00009Written by the `Libc++ Team <https://libcxx.llvm.org>`_
Louis Dionne42222072018-09-06 14:46:22 +000010
11.. warning::
12
Hans Wennborg87aea3c2020-07-15 11:40:53 +020013 These are in-progress notes for the upcoming libc++ 12 release.
Louis Dionne42222072018-09-06 14:46:22 +000014 Release notes for previous releases can be found on
Hans Wennborg3329a842018-09-10 08:57:12 +000015 `the Download Page <https://releases.llvm.org/download.html>`_.
Louis Dionne42222072018-09-06 14:46:22 +000016
17Introduction
18============
19
20This document contains the release notes for the libc++ C++ Standard Library,
Hans Wennborg87aea3c2020-07-15 11:40:53 +020021part of the LLVM Compiler Infrastructure, release 12.0.0. Here we describe the
Louis Dionne42222072018-09-06 14:46:22 +000022status of libc++ in some detail, including major improvements from the previous
23release and new feature work. For the general LLVM release notes, see `the LLVM
Hans Wennborg3329a842018-09-10 08:57:12 +000024documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM releases may
25be downloaded from the `LLVM releases web site <https://llvm.org/releases/>`_.
Louis Dionne42222072018-09-06 14:46:22 +000026
27For more information about libc++, please see the `Libc++ Web Site
Hans Wennborg3329a842018-09-10 08:57:12 +000028<https://libcxx.llvm.org>`_ or the `LLVM Web Site <https://llvm.org>`_.
Louis Dionne42222072018-09-06 14:46:22 +000029
Hans Wennborgfc14f4e2020-01-15 10:02:56 +010030Note that if you are reading this file from a Git checkout or the
Louis Dionne42222072018-09-06 14:46:22 +000031main Libc++ web page, this document applies to the *next* release, not
32the current one. To see the release notes for a specific release, please
Hans Wennborg3329a842018-09-10 08:57:12 +000033see the `releases page <https://llvm.org/releases/>`_.
Louis Dionne42222072018-09-06 14:46:22 +000034
Hans Wennborg87aea3c2020-07-15 11:40:53 +020035What's New in Libc++ 12.0.0?
Hans Wennborg003a9982019-07-18 11:51:05 +000036============================
Louis Dionne42222072018-09-06 14:46:22 +000037
38New Features
39------------
Mark de Wever8b38f962021-01-22 19:03:14 +010040- Random device support has been made optional. It's enabled by default and can
41 be disabled by building libc++ with ``-DLIBCXX_ENABLE_RANDOM_DEVICE=OFF``.
42 Disabling random device support can be useful when building the library for
43 platforms that don't have a source of randomness, such as some embedded
44 platforms. When this is not supported, most of ``<random>`` will still be
45 available, but ``std::random_device`` will not.
46- Localization support has been made optional. It's enabled by default and can
47 be disabled by building libc++ with ``-DLIBCXX_ENABLE_LOCALIZATION=OFF``.
48 Disabling localization can be useful when porting to platforms that don't
49 support the C locale API (e.g. embedded). When localization is not
50 supported, several parts of the library will be disabled: ``<iostream>``,
51 ``<regex>``, ``<locale>`` will be completely unusable, and other parts may be
52 only partly available.
53- If libc++ is compiled with a C++20 capable compiler it will be compiled in
54 C++20 mode. Else libc++ will be compiled in C++17 mode.
55- Several unqualified lookups in libc++ have been changed to qualified lookups.
56 This makes libc++ more ADL-proof.
57- The libc++ implementation status pages have been overhauled. Like other parts
58 documentation they now use restructured text instead of html. Starting with
59 libc++12 the status pages are part of libc++'s documentation.
60- More C++20 features have been implemented. :doc:`Cxx2aStatus` has the full
61 overview of libc++'s C++20 implementation status.
62- Work has started to implement new C++2b features. :doc:`Cxx2bStatus` has the
63 full overview of libc++'s C++2b implementation status.
Louis Dionne42222072018-09-06 14:46:22 +000064
Raul Tambreafcedea2020-06-19 12:43:33 +053065
Louis Dionne42222072018-09-06 14:46:22 +000066API Changes
67-----------
Louis Dionne283d5162019-10-01 09:34:58 -040068- By default, libc++ will _not_ include the definition for new and delete,
69 since those are provided in libc++abi. Vendors wishing to provide new and
70 delete in libc++ can build the library with ``-DLIBCXX_ENABLE_NEW_DELETE_DEFINITIONS=ON``
71 to get back the old behavior. This was done to avoid providing new and delete
72 in both libc++ and libc++abi, which is technically an ODR violation. Also
73 note that we couldn't decide to put the operators in libc++ only, because
74 they are needed from libc++abi (which would create a circular dependency).
Mark de Wever896e0742020-11-24 14:50:49 +010075- During the C++20 standardization process some new low-level bit functions
76 have been renamed. Libc++ has renamed these functions to match the C++20
77 Standard.
78 - ``ispow2`` has been renamed to ``has_single_bit``
79 - ``ceil2`` has been renamed to ``bit_ceil``
80 - ``floor2`` has been renamed to ``bit_floor``
81 - ``log2p1`` has been renamed to ``bit_width``
Martin Storsjöe3a71972020-10-26 13:18:46 +020082
83- In C++20 mode, ``std::filesystem::path::u8string()`` and
84 ``generic_u8string()`` now return ``std::u8string`` according to P0428,
85 while they return ``std::string`` in C++17. This can cause source
86 incompatibility, which is discussed and acknowledged in P1423, but that
87 paper doesn't suggest any remediation for this incompatibility.