|
Boost Users : |
Subject: Re: [Boost-users] [iostreams] why doesn't file_sink flush?
From: eg (egoots_at_[hidden])
Date: 2009-05-06 15:43:02
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/
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net