Boost logo

Boost Users :

From: John Maddock (john_maddock_at_[hidden])
Date: 2002-06-20 05:53:13


> Well, I don't think, it's a compiler problem.
> stringbuf::str() retuns a temporary string. This is passed on to
> regex_match().
> The real problem is, the data in matchInfo is not stored as a copy of the
> processed string, but as a reference to its characters.
> So, when the temoprary string is being destroyed, the result in matchInfo
is
> also lost.

Yes of course, sorry I was being particularly dense. The storing of
iterators is *by design*, I don't want the overhead of copying an
arbitrarily large amount of text, and in any case you need the iterators in
order to do search and replace operations...

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


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