$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: John Maddock (john_at_[hidden])
Date: 2004-09-11 07:11:39
> What should be the behavior of a regex::smatch whenever the
> regex::expression you are trying to match is not a well formed regex
> expression?
> 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".
John.