Topic: Defect report [N2134]: Missing preconditions for regex_token_iterator c'tors


Author: "=?iso-8859-1?q?Daniel_Kr=FCgler?=" <daniel.kruegler@googlemail.com>
Date: Mon, 5 Mar 2007 13:22:37 CST
Raw View
The text provided in [re.tokiter.cnstr]-28.12.2.1/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 28.12.2/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.

Proposed resolution:

Add the following precondition paragraph just before the current
28.12.2.1/2:

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

Greetings from Bremen,

Daniel Kr   gler


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: gennaro.prota@yahoo.com (Gennaro Prota)
Date: Wed, 7 Mar 2007 04:10:18 GMT
Raw View
On Mon,  5 Mar 2007 13:22:37 CST, Daniel Kr=FCgler wrote *yet another*
defect report:

Guys, just let me say that if these reports are all correct then
Daniel definitely deserves a free copy of the standard signed by a
committee member of his choice :-)

--=20
Genny.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]