Boost logo

Boost Users :

From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2006-02-28 18:28:27


My reading of the docs states that array_sink models the concept sink,
meaning that the following should compile:

#include <boost/iostreams/device/array.hpp>
#include <boost/iostreams/operations.hpp>

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_impl<boost::iostreams::output>::write<boost::unwrap_reference<T>::type>(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::write<boost::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


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