<regex>
: Fix pointer-size constructor of basic_regex
and remove error_parse
by frederick-vs-ja · Pull Request #5211 · microsoft/STL (original) (raw)
error_parse
is a non-reserved identifier that is not used by the standard library. I think it's better to remove its use. Perhaps it would also be better to remove error_syntax
, but see #438.
Per [re.regex.construct]/6, the call to the pointer-size constructor of basic_regex
should be well-defined when p
is null and len
is 0
. This PR makes such case accepted and makes some UB case diagnosed with _STL_VERIFY
.
Drive-by: Strengthening exception specification of regex_error::code
.