$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Flushing a filtering_ostreambuf
From: eg (egoots_at_[hidden])
Date: 2009-01-30 13:05:43
jean-louis.a.leroy_at_[hidden] wrote:
> 
> However, when I put it in a filter, flushing the filter doesn't flush 
> the stream:
> 
> 
>   // scope
>   {
>     stream_buffer<debug_output_sink> 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.