Ticket #1574: fix-ptime-operator-2nd-bug1574.patch
File fix-ptime-operator-2nd-bug1574.patch, 1.9 KB (added by , 12 years ago) |
---|
-
boost/date_time/posix_time/posix_time_io.hpp
old new 45 45 std::basic_ostream<CharT, TraitsT>& 46 46 operator<<(std::basic_ostream<CharT, TraitsT>& os, 47 47 const ptime& p) { 48 typedef std::basic_ostream<CharT, TraitsT> __ostream_type; 49 typename __ostream_type::sentry cerb(os); 50 if (cerb) { 48 51 boost::io::ios_flags_saver iflags(os); 49 52 typedef boost::date_time::time_facet<ptime, CharT> custom_ptime_facet; 50 53 typedef std::time_put<CharT> std_ptime_facet; … … 62 65 os.imbue(l); 63 66 f->put(oitr, os, os.fill(), p); 64 67 } 68 } 65 69 return os; 66 70 } 67 71 … … 112 116 std::basic_ostream<CharT, TraitsT>& 113 117 operator<<(std::basic_ostream<CharT, TraitsT>& os, 114 118 const boost::posix_time::time_period& p) { 119 typedef std::basic_ostream<CharT, TraitsT> __ostream_type; 120 typename __ostream_type::sentry cerb(os); 121 if (cerb) { 115 122 boost::io::ios_flags_saver iflags(os); 116 123 typedef boost::date_time::time_facet<ptime, CharT> custom_ptime_facet; 117 124 typedef std::time_put<CharT> std_time_facet; … … 130 137 os.imbue(l); 131 138 f->put(oitr, os, os.fill(), p); 132 139 } 140 } 133 141 return os; 134 142 } 135 143 … … 178 186 std::basic_ostream<CharT, Traits>& 179 187 operator<<(std::basic_ostream<CharT, Traits>& os, const time_duration& td) 180 188 { 189 typedef std::basic_ostream<CharT, Traits> __ostream_type; 190 typename __ostream_type::sentry cerb(os); 191 if (cerb) { 181 192 boost::io::ios_flags_saver iflags(os); 182 193 typedef boost::date_time::time_facet<ptime, CharT> custom_ptime_facet; 183 194 typedef std::time_put<CharT> std_ptime_facet; … … 195 206 os.imbue(l); 196 207 f->put(oitr, os, os.fill(), td); 197 208 } 209 } 198 210 return os; 199 211 } 200 212