From: Cristian Mattarei Date: Mon, 9 Jan 2017 03:00:09 +0000 (-0800) Subject: With reference to Bug 679, this commit integrates part of the patch proposed, and... X-Git-Tag: cvc5-1.0.0~5921^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f5eff29054e3eb70ef0e04516b4bd7e49f28db79;p=cvc5.git With reference to Bug 679, this commit integrates part of the patch proposed, and it fixes the correct float parsing of an std::istringstream. The compilation issue in Bug 679 does not apply anymore with gcc6.3.1 --- diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp index 64025fc04..ebb57da74 100644 --- a/src/main/command_executor.cpp +++ b/src/main/command_executor.cpp @@ -254,7 +254,9 @@ void CommandExecutor::printStatsFilterZeros(std::ostream& out, std::getline(iss, statValue, '\n'); double curFloat; - bool isFloat = static_cast(std::istringstream(statValue) >> curFloat); + std::istringstream iss_stat_value (statValue); + iss_stat_value >> curFloat; + bool isFloat = iss_stat_value.good(); if( (isFloat && curFloat == 0) || statValue == " \"0\"" ||