
Thanks. That did it. I was focusing on the string to match not the return type. Makes since that they need to be the same type. Troy -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of John Maddock Sent: Wednesday, October 10, 2007 2:44 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] regex_search in std::string Troy Alexander wrote:
The 1st regex_search looking at input_line char[] works Ok it's the 2nd one looking at date_and_time_s std::string that gets the error. If I remark out the 2nd one the program builds and I watch the input_line doing what it should in the debugger.
Also this code used to work before I upgraded from Visual C++6 to Visual C++8 and from bost_1_33_1 to boost_1_34_0. I don't know if it was the change in compiler or the boost lib that broke this.
In VC6 this worked "by accident" because const char* and std::string::const_iterator were the same type. That's not true in general, and you should use boost::smatch as the match_results type for use with std::string's. HTH, John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users