regex_constants::match_prev_avail
is underspecifiedSection: 28.6.4.3 [re.matchflag] Status: New Submitter: Jonathan Wakely Opened: 2021-09-27 Last modified: 2021-10-14
Priority: 3
View all other issues in [re.matchflag].
View all issues with New status.
Discussion:
The standard doesn't say what it means if match_prev_avail
is set. Table [tab:re.matchflag] says:
--first
is a valid iterator position. When this flag is set the flagsmatch_not_bol
andmatch_not_bow
shall be ignored by the regular expression algorithms (28.6.10 [re.alg]) and iterators (28.6.11 [re.iter]).
What difference does it make whether --first
is a valid iterator position or not?
--first
?
Examples like regex_match("xa"+1, regex("^a"), match_prev_avail)
and regex_match("xa"+1, regex("\\ba"), match_prev_avail)
are presumably supposed to inspect the character at --first
to determine if there is a match.
The standard doesn't specify that *--first
is ever inspected,
only that it's a valid character
(which is a useless guarantee if nothing looks at it).
[2021-10-14; Reflector poll]
Set priority to 3 after reflector poll.
Proposed resolution: