--- boost_1_43_0-orig/boost/date_time/posix_time/posix_time_io.hpp 2008-11-13 20:05:31.000000000 +0100 +++ boost_1_43_0/boost/date_time/posix_time/posix_time_io.hpp 2010-06-07 11:18:58.000000000 +0200 @@ -45,6 +45,8 @@ std::basic_ostream& operator<<(std::basic_ostream& os, const ptime& p) { + if (os.fail()) + return os; boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; typedef std::time_put std_ptime_facet; @@ -112,6 +114,8 @@ std::basic_ostream& operator<<(std::basic_ostream& os, const boost::posix_time::time_period& p) { + if (os.fail()) + return os; boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; typedef std::time_put std_time_facet; @@ -178,6 +182,8 @@ std::basic_ostream& operator<<(std::basic_ostream& os, const time_duration& td) { + if (os.fail()) + return os; boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; typedef std::time_put std_ptime_facet;