Iostreams 'drain' algorithm proposal

Hello list. New here, but a Boost user so thought it was time I started lurking with a view to contributing. When using boost::iostreams, I find I frequently need/implement a 'drain' algorithm. This is identical to boost::iostreams::copy, except that it doesn't close the Sink. This allows mutiple sources to be 'drained' into a single sink. Unless there is a generic algorithm for doing this that I have missed, I'd like to propose the addition of the 'drain' algorithm to boost::iostreams. I have a patch, should there be any interest. Andrew Walrond

Andrew Walrond wrote:
Hello list.
New here, but a Boost user so thought it was time I started lurking with a view to contributing.
When using boost::iostreams, I find I frequently need/implement a 'drain' algorithm. This is identical to boost::iostreams::copy, except that it doesn't close the Sink. This allows mutiple sources to be 'drained' into a single sink.
Unless there is a generic algorithm for doing this that I have missed, I'd like to propose the addition of the 'drain' algorithm to boost::iostreams.
I have a patch, should there be any interest.
I like this idea. I think a good way to implement it might be to use Boost.Parameters, like so: copy(src, sink, close_sink=false) -- Jonathan Turkanis www.kangaroologic.com

Hi Jonathan, On Saturday 07 January 2006 04:39, Jonathan Turkanis wrote:
I like this idea. I think a good way to implement it might be to use Boost.Parameters, like so:
copy(src, sink, close_sink=false)
Sounds like a great idea. And thanks for alerting me to the Boost.Parameter library ;) Will you make the change, or would you like me to prepare a patch? Andrew Walrond
participants (2)
-
Andrew Walrond
-
Jonathan Turkanis