From c3a268b2c32a59f5bef6c4c9bc3925cd40d86b04 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 5 Aug 2013 22:39:44 +1000 Subject: [PATCH] Set number iostream precision to maximum --- json.cpp.rl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/json.cpp.rl b/json.cpp.rl index 650852cd..c97105ee 100644 --- a/json.cpp.rl +++ b/json.cpp.rl @@ -24,16 +24,17 @@ #include "io.hpp" #include "maths.hpp" -#include -#include -#include #include +#include +#include +#include #include +#include -#include -#include -#include #include +#include +#include +#include using namespace std; @@ -521,7 +522,7 @@ json::string::operator ==(const char *rhs) const std::ostream& json::number::write (std::ostream &os) const { - os << m_value; + os << setprecision (numeric_limits::digits10) << m_value; return os; }