Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2006-01-06 23:39:32

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

Boost list run by bdawes at, gregod at, cpdaniel at, john at