Boost logo

Boost :

From: Yakov Lerner (w) (yakov.lerner_at_[hidden])
Date: 2002-11-06 13:10:16


Backhround:
    On Solaris, wchar_t is 4 bytes(int), not 2 bytes as on
    windows and on Linux. In our app, we want to work with
    2-byte-wide strings on any platform, so we define

       typedef basic_string<unsigned char> unicode_string;

    , which is different from basic_string<wchar_t>,
    but this works perfectly good with STL. So far, so good.
    
Problem:

    With boost regex, when I'm trying to use this regex
    compatible with basic_string<unsigned char>:

typedef boost::reg_expression<unsigned short,
   regex_traits<unsigned short>, BOOST_DEFAULT_ALLOCATOR(
   unsigned short)> re_type;

    ,I get million of compile errors about missing traits etc.

Question:
Q: In order to use boost::reg_expression<unsigned short,..> on the
platform where
'wchar_t' is not 'unsigned short', what do I need to do ?
    
Jacob L.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk