|
Boost Users : |
From: Pavol Droba (droba_at_[hidden])
Date: 2005-02-21 07:58:38
On Mon, Feb 21, 2005 at 12:23:03PM -0000, John Maddock wrote:
> >The reason the code I sent "hangs" is because it's iterating over a
> >zero length match.
> >which consumes 0 characters of input per loop. I must do that once a
> >year in any language I use, you think I'd learn huh?
>
> If you'd used regex_iterator or regex_token_iterator then they would have
> taken care of that special case for you, and it wouldn't have gone round
> and round (Pavol: any reason why the string lib isn't using these
> internally?).
>
This is probably good idea. Regex support in the StringAlgo is more-less conceptual
proof of concept, that the library can be extended to handle complicated
finder/formatters.
The library does not use the regex_iterator internaly, since it would make no sense.
StringAlgo has its own tokenizing facility, that is differnet from the one
provided by regex. Regex is used only as a plugable component.
> >If I can reproduce the segfault and I can't see why it's my fault, can
> >I post that too? Or can we skip that and have y'all start channeling
> >me the clues now. :)
>
> Please do, make sure it's not down to referencing temporary objects after
> they've gone out of scope (that's the most common cause of segfaults around
> here).
>
Anyway, it is possible, that there is indeed a problem in the StringAlgo library.
As I said, I'll look at it later on.
Regards,
Pavol
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