From 12c3560472738aaab27f756dd17e05a5119d3913 Mon Sep 17 00:00:00 2001 From: AlexBeattie42 <30098201+alexbeattie42@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:25:37 +0300 Subject: [PATCH] Test alternative stod --- OpenSim/Common/IO.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenSim/Common/IO.cpp b/OpenSim/Common/IO.cpp index dfe2d4e078..bd442129fc 100644 --- a/OpenSim/Common/IO.cpp +++ b/OpenSim/Common/IO.cpp @@ -480,6 +480,11 @@ OpenOutputFile(const string &aFileName,ios_base::openmode mode) double IO:: stod(const std::string& __str, std::size_t* __idx) { + double result; + struct ios_base : public std::ios_base {} s3; + s3.imbue(_locale); + std::ios::iostate err = std::ios_base::goodbit; + std::use_facet< std::num_get< char, std::string::const_iterator > >( s3.getloc() ).get( __str.begin(), __str.end(), s3, err, result ); // std::istringstream iss(__str); // iss.imbue(_locale); // double result = 0.0;