Boost logo

Boost Users :

From: Troy Alexander (TAlexander_at_[hidden])
Date: 2007-10-10 10:26:56


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_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of John Maddock
Sent: Wednesday, October 10, 2007 2:44 AM
To: boost-users_at_[hidden]
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_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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