From 8034a70bd3122005aab485013f85cebe12989cd2 Mon Sep 17 00:00:00 2001 From: Yichen Date: Mon, 5 Apr 2021 11:24:46 +0800 Subject: [PATCH] Check for libc++ instead of clang to workaround a libc++ bug. (#3194) --- lib/mathlib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mathlib.cpp b/lib/mathlib.cpp index dab7a3fd2..8f04f8b8b 100644 --- a/lib/mathlib.cpp +++ b/lib/mathlib.cpp @@ -603,7 +603,7 @@ double MathLib::toDoubleNumber(const std::string &str) // nullcheck if (isNullValue(str)) return 0.0; -#ifdef __clang__ +#ifdef _LIBCPP_VERSION if (isFloat(str)) // Workaround libc++ bug at http://llvm.org/bugs/show_bug.cgi?id=17782 // TODO : handle locale return std::strtod(str.c_str(), nullptr);