diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index e6ed65666..d49f30e4e 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp @@ -11,13 +11,6 @@ #include #include -// Older versions of libstdc++ are missing support for from_chars() with floats, and was only recently -// merged in libc++. So, just fall back to stringstream (yuck!) on everywhere except MSVC. -#if !defined(_MSC_VER) -#include -#include -#endif - #ifndef __APPLE__ #include // alloca #else @@ -339,8 +332,6 @@ template requires std::is_floating_point_v std::string StringUtil::ToChars(const T value) { - // No to_chars() in older versions of libstdc++/libc++. -#ifdef _MSC_VER constexpr size_t MAX_SIZE = 64; char buf[MAX_SIZE]; std::string ret; @@ -348,12 +339,6 @@ std::string StringUtil::ToChars(const T value) if (result.ec == std::errc()) ret.append(buf, result.ptr - buf); return ret; -#else - std::ostringstream ss; - ss.imbue(std::locale::classic()); - ss << value; - return std::move(ss).str(); -#endif } // Instantiating with known types