The question is, I think, why the wide string
write() is not 'wchar_t const*'?
If it has to be for some reason, then you're going
to need to do some casting. Included is a modified form of your audiostream.hpp
that fixes it (and compiles with VC8).
If it doesn't, then it's a real simple
fix.
The problem is not with
multibyte2wide.
It's that your write() method takes 'unsigned
char const*', whereas winstl::multibyte2wide's char type is 'wchar_t'. On VC6
these are the same (because wchar_t is a typedef); on VC8 these are different
because wchar_t is a full-fledged type.
:-)
Hi,
I'm getting this compilation error on MSVC++
2005:
h:\adish\dev\audiostream\audiostream\audiostream\audiostream.hpp(56)
: error C2664: 'std::streamsize
audiostream::audio_sink<SinkType>::write(const unsigned short
*,std::streamsize)' : cannot convert parameter 1
from 'stlsoft::winstl_project::multibyte2wide<CCH>' to 'const
unsigned short *'
with
[
SinkType=boost::iostreams::sink
]
and
[
CCH=256
]
No user-defined-conversion
operator available that can perform this conversion, or the operator
cannot be called
See context here.
Essentially
I try to pass a winstl::a2w() to a
method expecting const unsigned short* s.
It works fine on MSVC++6.
Any
thoughts?
Thanks,
Adi