Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Regex 1.39.0: Crash in boost::sub_match::str()
From: Peter Klotz (peter.klotz_at_[hidden])
Date: 2009-05-15 11:54:10


Hello Anthony

> Regex does not keep a copy of the string, but instead uses the passed in
> string. The result of the filename method is going out of scope
> immediately after the regex_match call, and the memory in match.str() is
> invalid.

Thanks a lot. I did not realize that the iterators have to survive the
call but it is obvious now.

Regards, Peter.


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