Check for libc++ instead of clang to workaround a libc++ bug. (#3194)
This commit is contained in:
parent
de2e836727
commit
8034a70bd3
|
@ -603,7 +603,7 @@ double MathLib::toDoubleNumber(const std::string &str)
|
||||||
// nullcheck
|
// nullcheck
|
||||||
if (isNullValue(str))
|
if (isNullValue(str))
|
||||||
return 0.0;
|
return 0.0;
|
||||||
#ifdef __clang__
|
#ifdef _LIBCPP_VERSION
|
||||||
if (isFloat(str)) // Workaround libc++ bug at http://llvm.org/bugs/show_bug.cgi?id=17782
|
if (isFloat(str)) // Workaround libc++ bug at http://llvm.org/bugs/show_bug.cgi?id=17782
|
||||||
// TODO : handle locale
|
// TODO : handle locale
|
||||||
return std::strtod(str.c_str(), nullptr);
|
return std::strtod(str.c_str(), nullptr);
|
||||||
|
|
Loading…
Reference in New Issue