Boost logo

Boost Users :

From: Mark Sizer (yg-boost-users_at_[hidden])
Date: 2003-06-11 22:34:23


I compiling the same code on both platforms (same my code, same boost
code). Under Windows (MSVC++ 6 w/SP something), this compiles:

     // these are constructed w/values, it's just ugly here
     std::string sRegEx();
     std::string sMe();
     boost::regex regexpPattern( sRegEx );
     boost::cmatch mrFound;
     bool bMatch = boost::regex_search(sMe, mrFound, regexpPattern);

Under Linux (gcc 3.3) I get an error message (I added the whitespace):

error: could not convert `mrFound' to
`boost::match_results<
    std::__normal_iterator<
       const char*,
       std::basic_string<
         char,
         std::char_traits<char>,
         std::allocator<char>
>
>,
    std::allocator<char>
>&'

Digging around a little bit, I found this:

template <class iterator, class Allocator>
class match_results : yadda yadda

and

typedef match_results<const char*> cmatch;

This certainly SEEMS much simpler than what the error message claims to
be looking for.

Can anyone help, please?

Thanks,
   - Mark


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