Title
Missing preconditions for regex_token_iterator c'tors
Status
cd1
Section
[re.tokiter.cnstr]
Submitter
Daniel Krügler

Created on 2007-03-05.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Add the following precondition paragraph just before the current [re.tokiter.cnstr]/2:

Requires: Each of the initialization values of subs must be >= -1.

Date: 2007-03-05.00:00:00

The text provided in [re.tokiter.cnstr]/2+3 describes the effects of the three non-default constructors of class template regex_token_iterator but is does not clarify which values are legal values for submatch/submatches. This becomes an issue, if one takes [re.tokiter]/9 into account, which explains the notion of a "current match" by saying:

The current match is (*position).prefix() if subs[N] == -1, or (*position)[subs[N]] for any other value of subs[N].

It's not clear to me, whether other negative values except -1 are legal arguments or not - it seems they are not.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3335
2007-03-05 00:00:00admincreate