fix: output stream operator implementation fixed

This commit is contained in:
Mateusz Pusz
2021-09-25 12:53:44 +02:00
parent c9708fb642
commit 7acc209eb4

View File

@@ -54,6 +54,9 @@ std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>&
if(os.width()) {
// std::setw() applies to the whole quantity output so it has to be first put into std::string
std::basic_ostringstream<CharT, Traits> s;
s.flags(os.flags());
s.imbue(os.getloc());
s.precision(os.precision());
detail::to_stream(s, q);
return os << s.str();
}