[libc++][C++17] Elementary string conversions for integral types
authorZhihao Yuan <zy@miator.net>
Wed, 1 Aug 2018 02:38:30 +0000 (02:38 +0000)
committerZhihao Yuan <zy@miator.net>
Wed, 1 Aug 2018 02:38:30 +0000 (02:38 +0000)
commitd27489645bb8829a952f79e3b211202844238391
tree870d3b745b4a01ddf8b2e569f3f17b81e92ce725
parent1dd9501b3a455be649bc5af484f62433753e75cf
[libc++][C++17] Elementary string conversions for integral types

Summary:
Major QoI considerations:

- The facility is backported to C++14, same as libstdc++.
- Efforts have been made to minimize the header dependencies.
- The design is friendly to the uses of MSVC intrinsics (`__emulu`, `_umul128`, `_BitScanForward`, `_BitScanForward64`) but not implemented; future contributions are welcome.

Thanks to Milo Yip for contributing the implementation of `__u64toa` and `__u32toa`.

References:
 https://wg21.link/p0067r5
 https://wg21.link/p0682r1

Reviewers: mclow.lists, EricWF

Reviewed By: mclow.lists

Subscribers: ldionne, Quuxplusone, christof, mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D41458

llvm-svn: 338479
libcxx/include/CMakeLists.txt
libcxx/include/charconv [new file with mode: 0644]
libcxx/include/module.modulemap
libcxx/src/charconv.cpp [new file with mode: 0644]
libcxx/test/libcxx/double_include.sh.cpp
libcxx/test/std/utilities/charconv/charconv.from.chars/integral.bool.fail.cpp [new file with mode: 0644]
libcxx/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp [new file with mode: 0644]
libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp [new file with mode: 0644]
libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp [new file with mode: 0644]
libcxx/test/support/charconv_test_helpers.h [new file with mode: 0644]