Ticket #5174: code_converter-flushable.diff
| File code_converter-flushable.diff, 1.6 KB (added by , 12 years ago) |
|---|
-
boost/iostreams/code_converter.hpp
191 191 if (which == BOOST_IOS::out && (flags_ & f_output_closed) == 0) { 192 192 flags_ |= f_output_closed; 193 193 detail::execute_all( 194 detail::flush_buffer(buf_.second(), dev(), can_write::value),195 194 detail::call_close(dev(), BOOST_IOS::out), 196 195 detail::call_reset(dev_), 197 196 detail::call_reset(buf_.first()), … … 200 199 } 201 200 } 202 201 202 bool flush() 203 { 204 detail::execute_all( 205 detail::flush_buffer(buf_.second(), dev(), can_write::value) 206 ); 207 return true; 208 } 209 203 210 bool is_open() const { return (flags_ & f_open) != 0;} 204 211 205 212 device_type& dev() { return **dev_; } … … 254 261 public: 255 262 typedef intern_type char_type; 256 263 struct category 257 : impl_type::mode, device_tag, closable_tag, localizable_tag 264 : impl_type::mode, device_tag, closable_tag, localizable_tag, flushable_tag 258 265 { }; 259 266 BOOST_STATIC_ASSERT(( 260 267 is_same< … … 286 293 287 294 std::streamsize read(char_type*, std::streamsize); 288 295 std::streamsize write(const char_type*, std::streamsize); 296 bool flush() { return impl().flush(); } 289 297 void imbue(const std::locale& loc) { impl().cvt_.imbue(loc); } 290 298 291 299 // Direct device access.
