{{ message }}
Use _Verify_ranges_do_not_overlap in more places#5495
Merged
Conversation
and you can see where I copied the death test from
Contributor
Author
Contributor
Author
|
LLVM-139464 created. Now that copycats are not enforced to have non-overlap, this looks even less useful. |
Contributor
Author
I think that standard shoould have a weaker precondition here. Just dest not in [first, last) |
StephanTLavavej
requested changes
May 14, 2025
StephanTLavavej
approved these changes
May 16, 2025
Closed
Member
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Member
⛰️ ❌ 🏔️ |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Resolves #5472.
Only used the function in the places where it is a perfect match. So no
ranges::swap_rangeswith two sentinels, and nostd::copyetc with weaker precondition.I was very surprised to learn that
copy_if/remove_copy/remove_copy_if/unique_copyrequire non-overlap as follows:This implies that the destination range may fit the same element number as the source range contains. I thought only fitting the actually returned number of elements is enough.
Overall, now as I've done this, I'm not even sure if it is at all useful.