Boost logo

Boost Users :

From: EMalenfant_at_[hidden]
Date: 2006-03-01 11:34:15

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:
> io::array_sink lSink(x,4);
> const char* y = "abc";
> io::write( lSink, y, 4 );
> I must be doing something obviously wrong, on VC7.1 I get:
> c:\boost\boost_1_33_1\boost\iostreams\write.hpp(118) : error
> C2039: 'write'
> : is not a member of 'boost::iostreams::basic_array_sink<Ch>'

Hi Jeff,

I think this is related to the fact that array_sink is a "direct" sink.
At the bottom of this page: there is mention that
"io::write()" is subject the the precondition that the sink is *not*
convertible to "direct_tag".

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.


Éric Malenfant

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at