My reading of the docs states that array_sink models the concept sink,
meaning that the following should compile:
#include
#include
namespace io = boost::iostreams;
int main( int argc, char* argv[] )
{
char x[4] = {};
io::array_sink lSink(x,4);
const char* y = "abc";
io::write( lSink, y, 4 );
return 0;
}
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>'
with
[
Ch=char
]
c:\boost\boost_1_33_1\boost\iostreams\write.hpp(52) : see reference
to function template instantiation 'std::streamsize
boost::iostreams::detail::write_device_implboost::iostreams::output::write(T
&,const boost::iostreams::detail::member_char_type<T>::type
*,std::streamsize)' being compiled
with
[
T=boost::iostreams::array_sink
]
c:\dev\AAA - Advantage
New\DasNew\DasClientTest\DasClientTest.cpp(36) : see reference to function
template instantiation 'std::streamsize
boost::iostreams::writeboost::iostreams::array_sink(T &,const
boost::iostreams::detail::member_char_type<T>::type *,std::streamsize)'
being compiled
with
[
T=boost::iostreams::array_sink
]
Any thoughts are appreciated.
Thanks, Jeff