From 7acc209eb4a5767551839e4dca46028ecc250454 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Sat, 25 Sep 2021 12:53:44 +0200 Subject: [PATCH] fix: output stream operator implementation fixed --- src/core-io/include/units/quantity_io.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core-io/include/units/quantity_io.h b/src/core-io/include/units/quantity_io.h index 3a502982..0f3707b6 100644 --- a/src/core-io/include/units/quantity_io.h +++ b/src/core-io/include/units/quantity_io.h @@ -54,6 +54,9 @@ std::basic_ostream& operator<<(std::basic_ostream& if(os.width()) { // std::setw() applies to the whole quantity output so it has to be first put into std::string std::basic_ostringstream s; + s.flags(os.flags()); + s.imbue(os.getloc()); + s.precision(os.precision()); detail::to_stream(s, q); return os << s.str(); }