[libc++] Make to_chars base 10 header only.
authorMark de Wever <koraq@xs4all.nl>
Mon, 16 May 2022 15:12:18 +0000 (17:12 +0200)
committerMark de Wever <koraq@xs4all.nl>
Thu, 2 Jun 2022 06:00:31 +0000 (08:00 +0200)
commita15ae4139ceaa03c74089b727d91e39e772a94fb
tree68c6378c279c93f97ae4531564859a028e40b278
parentb418ef5cb90b32657dee46b068ac367787a8d2d6
[libc++] Make to_chars base 10 header only.

The functions to_chars and from_chars should offer 128-bit support. This
is the first step to implement 128-bit version of to_chars. Before
implementing 128-bit support the current code will be polished.

This moves the code from the dylib to the header in prepartion of

P2291 "Add Constexpr Modifiers to Functions to_chars and from_chars for
Integral Types in <charconv> Header"

Note some more cleanups will be done in follow-up commits
- Remove the _LIBCPP_AVAILABILITY_TO_CHARS from to_chars. With all code
  in the header the availablilty macro is no longer needed. This
  requires enabling the unit tests for additional platforms.
- The code in the dylib can switch to using the header implementation.
  This allows removing the code duplicated in the header and the dylib.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D125704
libcxx/include/CMakeLists.txt
libcxx/include/__charconv/tables.h [new file with mode: 0644]
libcxx/include/__charconv/to_chars_base_10.h [new file with mode: 0644]
libcxx/include/charconv
libcxx/include/module.modulemap
libcxx/src/charconv.cpp
libcxx/test/libcxx/private_headers.verify.cpp