30 Jan
2009
30 Jan
'09
6:05 p.m.
jean-louis.a.leroy@fortis.com wrote:
However, when I put it in a filter, flushing the filter doesn't flush the stream:
// scope { stream_buffer
debug_streambuf(debug_sink); ostream debug_stream(&debug_streambuf); filtering_ostreambuf filtering_buf; filtering_buf.push(debug_stream);
ostream os(&filtering_buf); os << "test"; os.flush(); // nothing filtering_buf.pubsync(); // nothing either filtering_buf.strict_sync(); // still nothing } // characters appear at last !
What I am missing here?
You may wish to read the thread at: http://thread.gmane.org/gmane.comp.lib.boost.user/33355 In particular, read the posts by Jonathan Turkanis. It may (or may not?) shed some additional light on flush.