
On 8/24/04 2:18 AM, "Jonathan Turkanis" <technews@kangaroologic.com> wrote: [SNIP]
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