libstdc++: Directly implement hexfloat std::from_chars for binary32/64
authorPatrick Palka <ppalka@redhat.com>
Mon, 17 Jan 2022 19:32:13 +0000 (14:32 -0500)
committerPatrick Palka <ppalka@redhat.com>
Mon, 17 Jan 2022 19:32:13 +0000 (14:32 -0500)
commitcc3bf3404e4b1cdd1110e450bd5df45fdaaaae85
tree4aff96d3e0e99f9cd4d21f8a5c22a9c7f3ad6271
parent6cb61e50ade62f1e7c8653b8d6fc6a632fd3977f
libstdc++: Directly implement hexfloat std::from_chars for binary32/64

libstdc++-v3/ChangeLog:

* src/c++17/floating_from_chars.cc: Include <bit>.
(ascii_to_hexit, starts_with_ci): Conditionally define.
(__floating_from_chars_hex):  Conditionally define.
(from_chars): Use __floating_from_chars_hex for
chars_format::hex parsing of binary32/64 float/double.
(testsuite/20_util/from_chars/7.cc): New test.
libstdc++-v3/src/c++17/floating_from_chars.cc
libstdc++-v3/testsuite/20_util/from_chars/7.cc [new file with mode: 0644]