[libcxx-commits] [PATCH] D131417: [libc++][format] Fixes floating-point formatting.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 8 10:42:48 PDT 2022
Mordante created this revision.
Mordante added reviewers: fsb4000, ldionne, vitaut.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Formatting the alternate form for the general categories should keep the
trailing zeros. This was reported by @fsb4000 in D131336 <https://reviews.llvm.org/D131336>.
The default format uses general formatting but this should not keep the
trailing zeros so the default format is not passed to the formatter.
While testing I found an off by one error; finding the exponent character
`e` in 1e+03 will start at after the `1` so a size of `4` can contain an
exponent.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131417
Files:
libcxx/include/__format/formatter_floating_point.h
libcxx/include/__format/parser_std_format_spec.h
libcxx/test/std/utilities/format/format.functions/format_tests.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131417.450873.patch
Type: text/x-patch
Size: 14617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220808/1ec2abe3/attachment-0001.bin>
More information about the libcxx-commits
mailing list