mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 12:54:25 +02:00
fix: output stream operator implementation fixed
This commit is contained in:
@@ -54,6 +54,9 @@ std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>&
|
|||||||
if(os.width()) {
|
if(os.width()) {
|
||||||
// std::setw() applies to the whole quantity output so it has to be first put into std::string
|
// std::setw() applies to the whole quantity output so it has to be first put into std::string
|
||||||
std::basic_ostringstream<CharT, Traits> s;
|
std::basic_ostringstream<CharT, Traits> s;
|
||||||
|
s.flags(os.flags());
|
||||||
|
s.imbue(os.getloc());
|
||||||
|
s.precision(os.precision());
|
||||||
detail::to_stream(s, q);
|
detail::to_stream(s, q);
|
||||||
return os << s.str();
|
return os << s.str();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user