llvm-project/libcxx
Mark de Wever ffe262a198 [libc++][format] Improve pointer formatters.
This changes the implementation of the formatter. Instead of inheriting
from a specialized parser all formatters will use the same generic
parser. This reduces the binary size.

The new parser contains some additional fields only used in the chrono
formatting. Since this doesn't change the size of the parser the fields
are in the generic parser. The parser is designed to fit in 128-bit,
making it cheap to pass by value.

The new format function is a const member function. This isn't required
by the Standard yet, but it will be after LWG-3636 is accepted.
Additionally P2286 adds a formattable concept which requires the member
function to be const qualified in C++23. This paper is likely to be
accepted in the 2022 July plenary.

This is based on D125606. That commit did the groundwork and did similar
changes for the string formatters.

Depends on D128139.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D128671
2022-06-29 08:39:42 +02:00
..
benchmarks [libc++] Don't force -O2 when building the benchmarks 2022-06-17 17:34:02 -04:00
cmake [libc++] Re-add transitive includes that had been removed since LLVM 14 2022-06-27 22:18:19 -04:00
docs [libc++][ranges] Finish LWG issues directly related to the One Ranges Proposal. 2022-06-28 12:00:15 -07:00
include [libc++][format] Improve pointer formatters. 2022-06-29 08:39:42 +02:00
lib [libcxx][AIX] Enable ABI list checking for XCOFF 2022-06-14 13:16:00 -04:00
src [libc++] Improve charconv base10 algorithm. 2022-06-21 17:45:40 +02:00
test [libc++][format] Improve pointer formatters. 2022-06-29 08:39:42 +02:00
utils [libc++] Re-add transitive includes that had been removed since LLVM 14 2022-06-27 22:18:19 -04:00
.clang-format [libcxx] Remove extraneous '---' lines in .clang-format files 2022-06-15 01:34:37 -07:00
.clang-tidy [libc++][clang-tidy] Enable bugprone-use-after-move and explicitly list all used checks 2022-06-21 20:25:04 +02:00
.gitignore
CMakeLists.txt [libcxx][AIX] Switch build compiler to clang 2022-06-13 21:45:18 -04:00
CREDITS.TXT Microsoft's floating-point to_chars powered by Ryu and Ryu Printf 2021-12-12 16:34:50 +01:00
LICENSE.TXT
TODO.TXT [libc++] Disallow volatile types in std::allocator 2021-09-22 11:47:38 -04:00
appveyor-reqs-install.cmd
appveyor.yml