Closed cschreib-ibex closed 1 year ago
"Fix" provided in https://github.com/danielaparker/jsoncons/pull/406. I simply disabled the automatic detection for from_chars
, such that it is disabled by default. Not knowing better which exact compiler/STL version works or not, I figured it was a simpler first step.
Thanks. We can revert for now.
Fix is in 0.170.0
Describe the bug
Recently, jsoncons has started using
std::from_char
when available. We are on Windows, with_MSC_VER == 1934
, which does enable it based on the checks incompiler_support.hpp
. However,std::from_chars
seems unable to parse all floating point representations, as demonstrated by tests failing (e.g.,"csv_parser number detection"
fails).I don't know if this is a quirk of the MSVC implementation that affects all versions, or if it is specific to our version of MSVC. But at present the
std::from_char
parsing does not have feature-parity with the classicstrtof
/strtod
.Enumerate the steps to reproduce the bug
_MSC_VER == 1934
)Include a small, self-contained example if possible
This code demonstrates the inconsistency. Outputs:
GCC 12.2 (compiler explorer)
MSVC 19.33 (compiler explorer)
What compiler, architecture, and operating system?
_MSC_VER == 1934
What jsoncons library version?