Boost logo

Boost Users :

From: TAKAHASHI Daisuke (daisuke_at_[hidden])
Date: 2005-03-01 22:54:56


I found why such a error occurs.

According to your call "boost::regex_match(value, mr, ee)",
the type of the first parameter is wstring (not const wchar_t*),
and of the second is match_results<const wchar_t*>.

So, the compiler selected the following overload from six.

bool regex_match (
       const std::basic_string<...>&,
       match_results < std::basic_string::const_iterator >&,
       const basic_regex<...>&,
       match_flag_type
)

This overload requires a reference to match_results
with std::basic_string::const_iterator template parameter.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This meens that the cast
   match_results < const wchar_t* >&,
to
   match_results < std::basic_string::const_iterator >&
was needed.

Such a cast can be done successfully in VC6,
but I think VC7.1's strict check did not allow it.

Thanks.

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
   TAKAHASHI Daisuke
                        daisuke_at_[hidden]
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-


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