[libcxx-commits] [PATCH] D144742: [libc++][format] Improves fill character.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 30 04:32:06 PDT 2023
Mordante created this revision.
Herald added a project: All.
Mordante updated this revision to Diff 500269.
Mordante added a comment.
Herald added a subscriber: arichardson.
Mordante updated this revision to Diff 500537.
Mordante updated this revision to Diff 500544.
Mordante updated this revision to Diff 515436.
Mordante updated this revision to Diff 516052.
Mordante updated this revision to Diff 516062.
Mordante updated this revision to Diff 516084.
Mordante updated this revision to Diff 516090.
Herald added a subscriber: mstorsjo.
Mordante updated this revision to Diff 516094.
Mordante updated this revision to Diff 516098.
Mordante updated this revision to Diff 517617.
Mordante updated this revision to Diff 517630.
Mordante updated this revision to Diff 517641.
Mordante updated this revision to Diff 517657.
Mordante updated this revision to Diff 517966.
Mordante published this revision for review.
Mordante added reviewers: ldionne, tahonermann, vitaut.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
CI fixes.
Mordante added a comment.
Rebased
Mordante added a comment.
CI fixes.
Mordante added a comment.
Rebased.
Mordante added a comment.
CI fixes.
Mordante added a comment.
CI fixes.
Mordante added a comment.
CI Fixes.
Mordante added a comment.
Test CI
Mordante added a comment.
Try to determine error.
Mordante added a comment.
Fixes UTF-16 bug.
Mordante added a comment.
Tests CI.
Mordante added a comment.
Trigger CI.
Mordante added a comment.
Trigger CI.
Mordante added a comment.
Adds missing paren.
Mordante added a comment.
Rebased and code polishing.
================
Comment at: libcxx/include/__format/parser_std_format_spec.h:431-432
+ _LIBCPP_HIDE_FROM_ABI constexpr void __validate_fill_character(_CharT __fill, bool __use_range_fill) {
+ // The forbidden fill characters all are 1-byte code points, thus the
+ // check can be omitted when more bytes are used.
+ if (__use_range_fill && (__fill == _CharT('{') || __fill == _CharT('}') || __fill == _CharT(':')))
----------------
The main change is to allow a UCS scalar value as fill character.
Especially for char based formatting this increase the number of valid
characters. Originally this was to be expected ABI breaking, however the
current change does not seem to break the ABI.
Implements
- P2572 <https://reviews.llvm.org/P2572> std::format() fill character allowances
Depends on D144499 <https://reviews.llvm.org/D144499>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144742
Files:
libcxx/docs/ReleaseNotes.rst
libcxx/docs/Status/Cxx2bPapers.csv
libcxx/docs/Status/FormatIssues.csv
libcxx/include/__format/formatter_floating_point.h
libcxx/include/__format/formatter_integral.h
libcxx/include/__format/formatter_output.h
libcxx/include/__format/parser_std_format_spec.h
libcxx/test/std/utilities/format/format.functions/fill.unicode.pass.cpp
libcxx/utils/ci/run-buildbot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144742.517966.patch
Type: text/x-patch
Size: 19864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230430/3efa79dc/attachment-0001.bin>
More information about the libcxx-commits
mailing list