I'm trying to compile the following with VS 2005 and Boost 1.40.0 but it isn't
compiling for me. Should it? Any suggestions for getting this to work?
Here is the jist of what I'm trying to do:
#include
#include
#include
#include
#include
int main()
{
typedef boost::iostreams::basic_arrayboost::uint8_t Uint8Array;
typedef boost::iostreams::stream<Uint8Array> Stream;
boost::scoped_arrayboost::uint8_t buffer(new boost::uint8_t[1]);
Stream stream(buffer.get(), 1);
boost::io::ios_all_saver ias(stream);
}
And here is the compilation error:
error C2664: 'boost::io::basic_ios_all_saver<Ch>::basic_ios_all_saver
(std::basic_ios<_Elem,_Traits> &)' : cannot convert parameter 1 from 'Stream'
to 'std::basic_ios<_Elem,_Traits> &'
with
[
Ch=char,
_Elem=char,
_Traits=std::char_traits<char>
]
and
[
_Elem=char,
_Traits=std::char_traits<char>
]