What's the status of to_chars/from_chars for floating-point types?
Ruslan Kabatsayev
b7.10110111@gmail.com
Mon Jun 24 18:13:00 GMT 2019
Hi all,
The C++17 functions to_chars and from_chars have been implemented for
integer types quite a long time. Until recently, there were no
implementations of their floating-point versions in major compilers.
Now that STL has implemented these functions completely in MSVC, I
wonder what their current status is in GCC.
So, is anyone actively working on it? If not, and no one is planning
to begin soon, I'm considering giving it a try. But first I have some
questions on it:
* What's the expected form of this functionality — should it be a
header-only implementation like the current one for integer types?
* Could it use e.g. some dedicated functions in glibc (possibly
implemented specially for libstdc++ — to take advantage of the
existing codebase for printf), or maybe use libdouble-conversion for
this (it can handle float and double types, not long double though)?
* Does it have to be fully self-contained in libstdc++, so that no
external dependencies would be tolerated?
* Does it have to noticeably outperform printf, or would basically the
same performance be good enough for a start?
Regards,
Ruslan
More information about the Libstdc++
mailing list