
24 Jul
2006
24 Jul
'06
10:38 p.m.
Hi Eric, On Mon, Jul 24, 2006 at 03:29:40PM -0700, Eric Niebler wrote:
Torsten Landschoff wrote:
boost::smatch sm; BOOST_REGEX_TEST(boost::regex_match(std::string(text), sm, re));
Here is your problem. You're performing a match on a temporary std::string. After regex_match returns, sm will be left holding iterators into a destroyed string. Try:
Ouch, of course. Perhaps I should not be trying getting a grip at boost::regex at this time. Thanks, I'll have to check if I produced the same bug at work. I think I am not as the string is a member over there, but I have to check. Thanks again and good night, Torsten