Hans Wennborg | 003a998 | 2019-07-18 11:51:05 +0000 | [diff] [blame] | 1 | ========================================= |
Hans Wennborg | 87aea3c | 2020-07-15 11:40:53 +0200 | [diff] [blame] | 2 | Libc++ 12.0.0 (In-Progress) Release Notes |
Hans Wennborg | 003a998 | 2019-07-18 11:51:05 +0000 | [diff] [blame] | 3 | ========================================= |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 4 | |
| 5 | .. contents:: |
| 6 | :local: |
| 7 | :depth: 2 |
| 8 | |
Hans Wennborg | 3329a84 | 2018-09-10 08:57:12 +0000 | [diff] [blame] | 9 | Written by the `Libc++ Team <https://libcxx.llvm.org>`_ |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 10 | |
| 11 | .. warning:: |
| 12 | |
Hans Wennborg | 87aea3c | 2020-07-15 11:40:53 +0200 | [diff] [blame] | 13 | These are in-progress notes for the upcoming libc++ 12 release. |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 14 | Release notes for previous releases can be found on |
Hans Wennborg | 3329a84 | 2018-09-10 08:57:12 +0000 | [diff] [blame] | 15 | `the Download Page <https://releases.llvm.org/download.html>`_. |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 16 | |
| 17 | Introduction |
| 18 | ============ |
| 19 | |
| 20 | This document contains the release notes for the libc++ C++ Standard Library, |
Hans Wennborg | 87aea3c | 2020-07-15 11:40:53 +0200 | [diff] [blame] | 21 | part of the LLVM Compiler Infrastructure, release 12.0.0. Here we describe the |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 22 | status of libc++ in some detail, including major improvements from the previous |
| 23 | release and new feature work. For the general LLVM release notes, see `the LLVM |
Hans Wennborg | 3329a84 | 2018-09-10 08:57:12 +0000 | [diff] [blame] | 24 | documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM releases may |
| 25 | be downloaded from the `LLVM releases web site <https://llvm.org/releases/>`_. |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 26 | |
| 27 | For more information about libc++, please see the `Libc++ Web Site |
Hans Wennborg | 3329a84 | 2018-09-10 08:57:12 +0000 | [diff] [blame] | 28 | <https://libcxx.llvm.org>`_ or the `LLVM Web Site <https://llvm.org>`_. |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 29 | |
Hans Wennborg | fc14f4e | 2020-01-15 10:02:56 +0100 | [diff] [blame] | 30 | Note that if you are reading this file from a Git checkout or the |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 31 | main Libc++ web page, this document applies to the *next* release, not |
| 32 | the current one. To see the release notes for a specific release, please |
Hans Wennborg | 3329a84 | 2018-09-10 08:57:12 +0000 | [diff] [blame] | 33 | see the `releases page <https://llvm.org/releases/>`_. |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 34 | |
Hans Wennborg | 87aea3c | 2020-07-15 11:40:53 +0200 | [diff] [blame] | 35 | What's New in Libc++ 12.0.0? |
Hans Wennborg | 003a998 | 2019-07-18 11:51:05 +0000 | [diff] [blame] | 36 | ============================ |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 37 | |
| 38 | New Features |
| 39 | ------------ |
Mark de Wever | 8b38f96 | 2021-01-22 19:03:14 +0100 | [diff] [blame] | 40 | - 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 Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 64 | |
Raul Tambre | afcedea | 2020-06-19 12:43:33 +0530 | [diff] [blame] | 65 | |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 66 | API Changes |
| 67 | ----------- |
Louis Dionne | 283d516 | 2019-10-01 09:34:58 -0400 | [diff] [blame] | 68 | - 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 Wever | 896e074 | 2020-11-24 14:50:49 +0100 | [diff] [blame] | 75 | - 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ö | e3a7197 | 2020-10-26 13:18:46 +0200 | [diff] [blame] | 82 | |
| 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. |