Boost logo

Boost Users :

From: Pipoun (pipoun_at_[hidden])
Date: 2007-07-24 09:48:52


Hello,

I'm trying to use the iostream libs using wstring, but I'm struggling
with wstring. Her is my little piece of code:

using namespace std;
using namespace boost;

struct Formatter {
        std::wstring operator() ( const match_results<const wchar_t*>& _Match ) {
                //TODO
                
                return wstring();
        }
};

int main(int argc, char** argv) {

wstring File; //skipped steps to put data in

wregex Regx(L"bla");
iostreams::wregex_filter Filter( Regx, Formatter() );

iostreams::filtering_wostream Out;
Out.push( Filter );
Out.push( iostreams::wfile_sink("FilenameFormatted.txt") );

Out << File;

}

I'm using boost 1_34. If I compile this code vith vc80 express, I get an error:
boost/iostreams/filter/aggregate.hpp(97) : error C2664: 'void
boost::iostreams::aggregate_filter<Ch,Alloc>::do_write<Sink>(Sink
&,const char *,std::streamsize)' : cannot convert parameter 2 from
'wchar_t *' to 'const char *'

I'm a little lost :(
Am I doing something wrong?

Thank you very much for your help!

pipoun


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