Libc++ 23.0.0 (In-Progress) Release Notes¶
Written by the Libc++ Team
Warning
These are in-progress notes for the upcoming libc++ 23.0.0 release. Release notes for previous releases can be found on the Download Page.
Introduction¶
This document contains the release notes for the libc++ C++ Standard Library, part of the LLVM Compiler Infrastructure, release 23.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. All LLVM releases may be downloaded from the LLVM releases web site.
For more information about libc++, please see the Libc++ Web Site or the LLVM Web Site.
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.
What’s New in Libc++ 23.0.0?¶
Implemented Papers¶
P2440R1:
ranges::iota,ranges::shift_leftandranges::shift_right(Github)
Improvements and New Features¶
The
std::ranges::fold_left_with_iteralgorithm has been optimized for segmented iterators, resulting in a performance improvement of up to 1.38x forstd::deque<int>iterators.std::copy(CharT*, CharT*, ostreambuf_iterator<CharT>)has been optimized, resulting in performance improvements of up to 25x.
Deprecations and Removals¶
The
std::launch::anyenumerator that was accidentally provided as an extension is now deprecated. It will be removed in LLVM 25.__wrap_iter’s (iterator type forarray,span,string,string_viewandvector)base()method has been removed as it was non-standard.
Potentially breaking changes¶
Announcements About Future Releases¶
ABI Affecting Changes¶
std::allocatoris trivially default constructible since LLVM 22. The behaviour can be reverted by defining_LIBCPP_DEPRECATED_ABI_NON_TRIVIAL_ALLOCATOR. Please inform the libc++ team if you need this flag, since it will be removed in LLVM 24 if there is no evidence that it’s required.bitset::operator[]returnsboolsince LLVM 22, making libc++ conforming. The behaviour can be reverted by defining_LIBCPP_DEPRECATED_ABI_BITSET_CONST_SUBSCRIPT_RETURN_REF. Please inform the libc++ team if you need this flag, since it will be removed in LLVM 24 if there is no evidence that it’s required.vector::iteratorandstring::iteratorno longer use__bounded_iter<__wrap_iter<Iter>>, but instead__bounded_iter<Iter>directly if_LIBCPP_ABI_BOUNDED_ITERATORS_IN_VECTORand_LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRINGare defined.The
const_iteratormember type ofstd::dequeis now corrected to hold a (possibly fancy) pointer to the (possibly fancy) pointer allocated in the internal map. E.g. when the allocators use fancy pointers, the internal map storesFancyPtr<T>objects, and the previous strategy accessed these objects viaconst FancyPtr<const T>lvalues, causing undefined behavior. Nowconst_iteratorstoresFancyPtr<const FancyPtr<T>>instead ofFancyPtr<const FancyPtr<const T>>, which is technically an ABI break when these two types have incompatible layouts. Theiteratormember type is also changed to storeFancyPtr<const FancyPtr<T>>because the internal map is never modified via aniterator. This is necessary for reducing undefined behavior and for addingconstexprsupport fordequein C++26, so we do not provide any way to opt-out of that behavior.