[libcxx-commits] [PATCH] D128929: [libc++] Implements 128-bit support in to_chars.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 30 10:51:21 PDT 2022


Mordante created this revision.
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++.

This is required by the Standard and makes it possible to add full
128-bit support to format.

The patch also fixes 128-bit from_chars "support". One unit test
required a too large value, this failed on 128-bit; the fix was to add
more characters to the input.

Note only base 10 has been optimized. Other bases can be optimized.

Note the 128-bit lookup table could be made smaller. This will be done later. I
really want to get 128-bit working in to_chars and format in the upcomming
LLVM 15 release, these optimizations aren't critical.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128929

Files:
  libcxx/include/__bits
  libcxx/include/__charconv/tables.h
  libcxx/include/__charconv/to_chars_base_10.h
  libcxx/include/charconv
  libcxx/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp
  libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp
  libcxx/test/support/charconv_test_helpers.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128929.441455.patch
Type: text/x-patch
Size: 26988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220630/66bbe689/attachment-0001.bin>


More information about the libcxx-commits mailing list