libstdc++: Use fast_float in std::from_chars for binary32/64
authorPatrick Palka <ppalka@redhat.com>
Mon, 17 Jan 2022 19:33:12 +0000 (14:33 -0500)
committerPatrick Palka <ppalka@redhat.com>
Mon, 17 Jan 2022 19:33:12 +0000 (14:33 -0500)
commit490e23032baaece71f2ec09fa1805064b150fbc2
tree1dd05a227a387dcfd145207bdcb28fd810a78a07
parent40b0d4472a2591cf27f3a81aa3fba57dc4532648
libstdc++: Use fast_float in std::from_chars for binary32/64

This makes our std::from_chars implementation use fast_float for decimal
parsing of binary32/64 numbers.  For other floating-point formats we
still use the fallback implementation that goes through the strtod family
of functions.

libstdc++-v3/ChangeLog:

* src/c++17/floating_from_chars.cc: (USE_LIB_FAST_FLOAT):
Conditionally define, and use it to conditionally include
fast_float.
(from_chars): Use fast_float for float and double when
USE_LIB_FAST_FLOAT.
libstdc++-v3/src/c++17/floating_from_chars.cc