return type of boost::iostreams::stream<T>::read()
I apologize, if i have missed something.
Reading the documentation about boost::iostreams library I could not find the
information which return type the boost::iostreams::stream's class is giving
me calling read(). I searched through the headers and every read() found
returns std::streamsize, which sounds reasonable to me.
I was surprised, that the code below does not compile
--------start code ----------
#include
Struebing, Axel, le-tex [axel.struebing@le-tex.de]:
Reading the documentation about boost::iostreams library I could not find the information which return type the boost::iostreams::stream's class is giving me calling read().
From the documentation, a boost::iostreams::stream derives from an std::basic_[i|o]stream, depending on the model of its underlying Device. In your example, the device is a Source, so I guess that the stream derives from std::basic_istream, whose read(char*, streamsize) method returns a basic_istream, not a streamsize.
The library offers the "streamsize read(stream, char*, streamsize)" function template. Using it in your example yould give something like (not tested):
#include
participants (2)
-
Eric MALENFANT
-
Struebing, Axel, le-tex