Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2004-08-28 01:47:50

On 8/24/04 2:18 AM, "Jonathan Turkanis" <technews_at_[hidden]> wrote:

> I think Daryle's pointer streams and null streams are useful, and may
> vote for their acceptance, but believe they would be better
> implemented as Sources and Sinks. Most of your ideas below also fit
> easily into this framework.
> For example, using my library, a null_buf and null_ostream can be
> defined as follows:
> struct null_sink : boost::io::sink {
> void write(char*, std::streamsize) { }
> };
> typedef boost::io::streambuf_facade<null_sink> null_buf;
> typedef boost::io::stream_facade<null_sink> null_ostream;
> Pointer streams can be defined like so:
> typedef boost::io::streambuf_facade<boost::io::array_resource>
> pointerbuf;
> typedef boost::io::stream_facade<boost::io::array_resource>
> pointerstream;
[TRUNCATE the more complicated ideas]

But why go through all the trouble to forcing an idea through a framework,
which is built on top of the Standard I/O framework, when the idea is simple
enough to go through the Standard framework directly?

Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

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