-
Notifications
You must be signed in to change notification settings - Fork 771
Wrong range in [alg.search] LWG4179 #7474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This does not sound editorial to me: https://github.com/cplusplus/draft/wiki/How-to-tell-if-an-issue-is-editorial Do you think it is? |
Indeed this is semantic issue. Sorry if I have misclassified it. But I do not consider this a semantic extension request. It's a simple bug, obviously, since {4,5} should be findable in {1,2,3,4,5}. The implementation is correct. |
Please see https://cplusplus.github.io/LWG/lwg-active.html#submit_issue instead |
Thanks for the hint Jonathan, I send you an email with the description. |
Got it, thanks |
Happy to hear Jonathan,
If there is anything we can do to support you feel free to ask.
Here is the link to the issue we file in the standard:
#7474
Kind regards & a nice weekend,
Oscar
***@***.***?anonymous&ep=bwmEmailSignature>
Book time to meet with ***@***.***?anonymous&ep=bwmEmailSignature>
From: Jonathan Wakely ***@***.***>
Sent: Friday, December 6, 2024 12:47 PM
To: cplusplus/draft ***@***.***>
Cc: Oscar Slotosch ***@***.***>; Author ***@***.***>
Subject: Re: [cplusplus/draft] Wrong range in [alg.search] (Issue #7474)
Sie erhalten nicht häufig E-Mails von ***@***.******@***.***>. Erfahren Sie, warum dies wichtig ist<https://aka.ms/LearnAboutSenderIdentification>
Caution: This is an external email and may be malicious. Please take care when clicking links or opening attachments.
Got it, thanks
-
Reply to this email directly, view it on GitHub<#7474 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABAAFAKKCNLYRP45645EFXL2EGFBXAVCNFSM6AAAAABTCS2SW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRTGAYTCMZZGU>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
The library issue exists now, see LWG 4179. |
During the qualification of the C++ STL Validas has pointed me to the following issue:
The specification of [alg.search] has a wrong range.
Currently the range is "[first1, last1 - (last2 - first2))" (exclusive) but should be "[first1, last1 - (last2 - first2)]" (inclusive).
So please correct the closing ")" to "]". Otherwise the last occurence will not be found.
We observed the issue in C++14 and C++17 and cppreference.com
The implementations do the right thing and work correctly and find even the last occurence.
For example in the list {1, 2, 3, 4, 5} the pattern {4,5} should be found (obviously).
In the case the last element is not included it will not be found.
The attached programm shows that the implementation is working and find the pattern.
rangebug.cpp.txt
The text was updated successfully, but these errors were encountered: