LWG-2220 Under-specification of `operator==` for `regex_token_iterator`
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Read stl/inc/regex around lines 3183–3189 and compare regex_token_iterator::operator== with the quoted WG21-N5054 Returns wording. Check the implementation against the end-of-sequence, suffix, and ordinary iterator cases; also consider whether a debug precondition check for the same underlying sequence is feasible. Done means the implementation's behavior and any proposed check are assessed against the stated requirements.
Written by the indexing model from the issue text.
Description
LWG-2220 Under-specification of operator== for regex_token_iterator
This LWG issue resolution is adding Preconditions, which would usually make it N/A for us, under the heading of "Something that increases the restrictions placed on users, but implementers aren't expected to enforce those restrictions." However, I'm tracking this with a GitHub issue for two reasons:
(1) We should consider whether it's feasible to add a debug precondition check for "same underlying sequence".
(2) It's unclear to me whether we correctly implement the existing Returns. Currently that's WG21-N5054 [re.tokiter.comp]/1:
bool operator==(const regex_token_iterator& right) const;
Returns:trueif*thisandrightare both end-of-sequence iterators, or if*thisandrightare both suffix iterators andsuffix == right.suffix; otherwise returnsfalseif*thisorrightis an end-of-sequence iterator or a suffix iterator. Otherwise returnstrueifposition == right.position,N == right.N, andsubs == right.subs. Otherwise returnsfalse.
The code doesn't immediately strike me as Doing What The Standard Says:
- Dominant language
- C++
- Stars
- 11.2k
- Forks
- 1.7k
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/STL
-
LWG
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 2 days
-
generator LWG
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
LWG
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
`<__msvc_math.hpp>`: `_USE_MATH_DEFINES` is ignored after the first `<math.h>` include under `/Zc:cmath`Possibly taken @tiagomacarios claimed this 10 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 2 days
Similar issues
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
ClickHouse/clickhouse-odbc#680 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ionut-mihalache/aqua#31 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
needs-kind
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
villagesql/villagesql-server#1702 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/vcpkg-tool#2191 · 1 reaction ·
Maintainers usually reply within 1 day