--- 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:42:52.000000000 +0200 @@ -45,6 +45,9 @@ std::basic_ostream& operator<<(std::basic_ostream& os, const ptime& p) { + typedef std::basic_ostream __ostream_type; + typename __ostream_type::sentry cerb(os); + if (cerb) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; typedef std::time_put std_ptime_facet; @@ -62,6 +65,7 @@ os.imbue(l); f->put(oitr, os, os.fill(), p); } + } return os; } @@ -112,6 +116,9 @@ std::basic_ostream& operator<<(std::basic_ostream& os, const boost::posix_time::time_period& p) { + typedef std::basic_ostream __ostream_type; + typename __ostream_type::sentry cerb(os); + if (cerb) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; typedef std::time_put std_time_facet; @@ -130,6 +137,7 @@ os.imbue(l); f->put(oitr, os, os.fill(), p); } + } return os; } @@ -178,6 +186,9 @@ std::basic_ostream& operator<<(std::basic_ostream& os, const time_duration& td) { + typedef std::basic_ostream __ostream_type; + typename __ostream_type::sentry cerb(os); + if (cerb) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; typedef std::time_put std_ptime_facet; @@ -195,6 +206,7 @@ os.imbue(l); f->put(oitr, os, os.fill(), td); } + } return os; }