Boost logo

Boost Users :

From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2006-03-01 14:16:12


Eric,

EMalenfant_at_[hidden] wrote:
> From: Jeff Flinn [mailto:TriumphSprint2000_at_[hidden]]
>>
>> My reading of the docs states that array_sink models the
>> concept sink, meaning that the following should compile:
>>
> [snip]
>>
>> io::array_sink lSink(x,4);
>>
>> const char* y = "abc";
>>
>> io::write( lSink, y, 4 );

[snip]

> I think this is related to the fact that array_sink is a "direct"
> sink.
> At the bottom of this page:
> http://www.boost.org/libs/iostreams/doc/?path=4.1.1.7 there is
> mention that "io::write()" is subject the the precondition that the
> sink is *not* convertible to "direct_tag".

Aarrgh, just when I thought I understood "concepts"...

> BTW, in the "details" of the iostreams library, there is a
> "direct_adapter" which seems to allow one to expose a "direct" Device
> as an "indirect" one.

Thanks for the info, I'll check it out. I assume that this is more efficient
than using an io::stream_buffer?

Thanks, Jeff


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