According to https://en.cppreference.com/w/cpp/compiler_support#cpp17, no major vendor yet supports floating point versions of std::to_chars
and std::from_chars
. I understand that correctly formatting a floating point number is nontrivial, yet implementations exists in the C library. However, these are affected by the environment, which is one of the reasons for adding std::to_chars
and std::from_chars
to the standard. Wouldn't then an implementation of these function simply come for free if you refactor the C library to depend on common low-level routines that does the actual conversion base conversion into some intermediate format. Then std::to_chars
and std::from_chars
could use the result more or less directly, and the more high-level API:s in C and C++ (printf
, atof
, strtod
, std::stof
, std::to_string
) can do some more fancy stuff.