Boost logo

Boost Users :

From: frank fu (omni123_at_[hidden])
Date: 2005-03-01 15:40:45


I am trying to move my code from vc6.0 to vc71. Here is the part of
code using boost regex:

boost::wregex ee(L"[E|e],(\\w+),(.+)$");
boost::wcmatch mr;
TString value=L"some char";
if (boost::regex_match(value, mr, ee))
{
...
}

Those code compiled with UNICODE and was ok on vc6.0. But when I
compile with VC71, it gives me error c2664:
============
d:\s\AEM\AEM6.0\source\AEMCore\AEMRulesCfgReg.cpp(176): error C2664:
'bool boost::regex_match<std::char_traits<wchar_t>,std::allocator<_Ty>,std::allocator<boost::sub_match<BidiIterator>>,wchar_t,traits,Allocator>(const
std::basic_string<_Elem,_Traits,_Ax>
&,boost::match_results<std::basic_string<_Elem,_Traits,_Ax>::const_iterator,std::allocator<boost::sub_match<BidiIterator>>>
&,const boost::reg_expression<charT,traits,Allocator>
&,boost::regex_constants::match_flag_type)' : cannot convert parameter
2 from 'boost::wcmatch' to
'boost::match_results<BidiIterator,Allocator> &'
        with
        [
            _Ty=wchar_t,
            BidiIterator=const unsigned short *,
            traits=boost::regex_traits<wchar_t>,
            Allocator=std::allocator<wchar_t>,
            _Elem=wchar_t,
            _Traits=std::char_traits<wchar_t>,
            _Ax=std::allocator<wchar_t>,
            charT=wchar_t
        ]
        and
        [
            BidiIterator=std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::const_iterator,
            Allocator=std::allocator<boost::sub_match<const unsigned short *>>
        ]
==================
also, I got lots warning C4018: '<' : signed/unsigned mismatch,
although that's ok for me right now.

Thanks for any help.

frank


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