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(); }