Created on 2018-06-30.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4750.
Change [re.tokiter.cnstr] p3 as indicated:
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default); regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const vector<int>& submatches, regex_constants::match_flag_type m = regex_constants::match_default); regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, initializer_list<int> submatches, regex_constants::match_flag_type m = regex_constants::match_default); template<size_t N> regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const int (&submatches)[N], regex_constants::match_flag_type m = regex_constants::match_default);-2- Requires: […]
-3- Effects: The first constructor initializes the member subs to hold the single value submatch.The second constructor initializes the member subs to hold a copy of the argument submatches.The second, third and fourth constructors initialize the member subs to hold a copy of the sequence of integer values pointed to by the iterator range[submatches.begin(), submatches.end()) and [&submatches, &submatches + N), respectively[begin(submatches), end(submatches)). -4- […]
[ 2018-11, Adopted in San Diego ]
[ 2018-07-20 Status to Tentatively Ready after five positive votes on the reflector. ]
The specification of regex_token_iterator for the overload taking a const int (&submatchs)[N] uses the range [&submatches, &submatches + N). This is obviously incorrect; we want to perform pointer arithmetic on a pointer to the first element of that array, not a pointer to the whole array.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2018-11-12 04:39:29 | admin | set | messages: + msg10198 |
2018-11-12 04:39:29 | admin | set | status: voting -> wp |
2018-10-08 05:13:59 | admin | set | status: ready -> voting |
2018-07-20 21:06:57 | admin | set | messages: + msg10036 |
2018-07-20 21:06:57 | admin | set | status: new -> ready |
2018-06-30 06:02:33 | admin | set | messages: + msg10002 |
2018-06-30 00:00:00 | admin | create |