From 019b07e67b849fc47de3e0e626e7eac2a2615e0e Mon Sep 17 00:00:00 2001 From: Yoann Le Montagner Date: Tue, 11 Jul 2023 16:30:31 +0200 Subject: [PATCH] Fix build error with GCC 4.8.5 --- src/rapidcsv.h | 4 ++-- tests/test092.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rapidcsv.h b/src/rapidcsv.h index 1682310..0fcf6bb 100644 --- a/src/rapidcsv.h +++ b/src/rapidcsv.h @@ -148,13 +148,13 @@ namespace rapidcsv else if (typeid(T) == typeid(float)) { std::ostringstream out; - out << std::defaultfloat << std::setprecision(9) << pVal; + out << std::setprecision(9) << pVal; pStr = out.str(); } else if (typeid(T) == typeid(double)) { std::ostringstream out; - out << std::defaultfloat << std::setprecision(17) << pVal; + out << std::setprecision(17) << pVal; pStr = out.str(); } else diff --git a/tests/test092.cpp b/tests/test092.cpp index 0f7d1fe..14adcab 100644 --- a/tests/test092.cpp +++ b/tests/test092.cpp @@ -11,7 +11,7 @@ int main() std::string loc = "de_DE"; // uses comma (,) as decimal separator try { - std::locale::global(std::locale(loc)); + std::locale::global(std::locale(loc.c_str())); } catch (const std::exception& ex) {