Andy Schweitzer wrote:
eg wrote:
Andy Schweitzer wrote:
eg wrote:
Andrew Schweitzer wrote:
That's a good idea. I don't know, I don't know the library well enough. That seemed like more code... but maybe a better idea. I tried this, wrapping fstream. Not sure if there's a reason not to do this:
class flushable_file_sink { <snip>
I don't see why not. You just need to make sure the lifetime of your stream outlives the filter chain which I think the iostreams file_sink does for you (see: http://www.boost.org/doc/libs/1_38_0/libs/iostreams/doc/classes/file.html). Having said that, it might be nice to add a feature request to make file_sink and file_descriptor_sink "flushable" so that future users could benefit without having to write their own. Do you want to create a New Ticket for this at: https://svn.boost.org/trac/boost/