-
-
Notifications
You must be signed in to change notification settings - Fork 379
Allow min:max indexing to always succeed if it is an empty selection #3362
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
Conversation
|
Note that this also allows doing these empty slices on size-0 containers. We could add e.g. I think it's logically sound though, and UBSAN seems fine with it. |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
Submission Checklist
./runTests.py src/test/unitmake cpplintSummary
Fixes #3359
Intended Effect
A
x:yselection where x is bigger than y results in an empty slice, even whenxis greater than the size of the container.How to Verify
Side Effects
Documentation
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Simons Foundation
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: