From: Lucas Galfaso (lgalfaso_at_[hidden])
Date: 2004-09-11 08:15:52
"John Maddock" <john_at_[hidden]> wrote in message
>> What should be the behavior of a regex::smatch whenever the
>> regex::expression you are trying to match is not a well formed regex
>> With the current implementation is crush and burn. I do not know what is
>> boost policy on this matter, but I think this is not desirable.
> 1) If you try and compile an invalid expression you get a
> boost::bad_expression exception thrown, it's up to you to handle it.
> 2) If you pass an invalid (or empty) regular expression object to one of
> the regex algorithms, then that's a (documented) precondition failure, and
> you get a std::invalid_argument exception thrown, and it's up to you to
> handle it.
> 3) The smatch object should be untouched after the above exception is
> thrown, that's hardly "crash and burn".
I think that the behavior you specify is perfect, unfortunate this is not
true with VC 6.0
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk