Title
regex_constants::match_prev_avail is underspecified
Status
new
Section
[re.matchflag]
Submitter
Jonathan Wakely

Created on 2021-09-27.00:00:00 last changed 38 months ago

Messages

Date: 2021-10-15.00:00:00

[ 2021-10-14; Reflector poll ]

Set priority to 3 after reflector poll.

Date: 2021-10-14.11:00:23

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 flags match_not_bol and match_not_bow shall be ignored by the regular expression algorithms ([re.alg]) and iterators ([re.iter]).

What difference does it make whether --first is a valid iterator position or not?

What behaviour is changed when it's a valid iterator position? The standard doesn't say anything else about that.

When do the regex algorithms care about --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).

History
Date User Action Args
2021-10-14 11:35:36adminsetmessages: + msg12162
2021-09-27 00:00:00admincreate