
4 Jun
2007
4 Jun
'07
6:38 a.m.
I did some debugging on the matter and I suspect that the line boost/date_time/posix_time/posix_time_io.hpp:61 is the culprit. It changes the locale of wcout and whatever machinery should revert this back, it does not. This agrees with my observation that using a wostringstream for formatting does not damage wcout.
By itself I don't see how this is a problem. You'll note the previous line:
std::locale l = std::locale(os.getloc(), f);
This code is adds a facet to the existing locale, makes a copy, which then gets imbued into the stream. So, all the previously existing locale settings should be preserved. Hmm, I see... Thanks for the explanation, I'll stick to stringstream
formatting then. Cheers, Filip