From: John Maddock (boost.regex_at_[hidden])
Date: 2003-09-02 05:22:55
> Also I see the existence of boost::regbase::use_except and
> I don't see how to use them in a way to enable/disable exceptions in
> expressions, dispite probably the activation of the general
> (Shame on me!).
> Question: It seems, that boost::regbase::use_except is always active,
> because it
> is or'ed to the flags arguments in every(?) c'tor or assignment of
> Is that true?
> If that is true: Why does the flag regbase::use_except (officially)
It's a historical accident and should have been removed from the docs.
> Lets assume, that throwing boost::bad_expression is a general policy (I
> can live with that),
> it would be **very** nice to have at least one (probably static) member
> which takes a textual regular expression and an optional bunch of
> regbase flags as arguments and
> returns a bool, which simply returns true in case of a valid expression,
> otherwise false. What
> do you think of that?
You could call the undocumented member function set_expression which would
return 0 on success, alternatively you're back to rolling your own, BTW why
do you want this? If a regular expression is valid, then presumably at some
point you would want to use it? I ask because the job of checking the
expression for validity is essentially the same as compiling it to a state
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk