Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Check for aliasing in RawViewMut::from_shape_ptr with a debug assertion #1413

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

bluss
Copy link
Member

@bluss bluss commented Aug 3, 2024

It should deny overlapping indexes. Because it's an unsafe function and we only do these checks on best-effort basis (caller has to ensure they are correct), it's a debug assertion.

Removed the small addition to a doc comment that was done in a previous PR (it was an unfinished idea).

Similar to pr #1410
Finishes and closes #919

@bluss bluss changed the title Check for aliasing in RawViewMut::from_shape_ptr Check for aliasing in RawViewMut::from_shape_ptr with a debug assertion Aug 3, 2024
It should deny overlapping indexes. Because it's an unsafe function and
we only do these checks on best-effort basis (caller has to ensure they
are correct), it's a debug assertion.

Removed the small addition to a doc comment that was done in a previous
PR (it was an unfinished idea).

Similar to pr #1410
Finishes and closes #919
@bluss bluss merged commit b03953a into master Aug 3, 2024
11 checks passed
@bluss bluss deleted the from-shape-ptr branch August 3, 2024 17:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add/remove aliasing checks in constructors
1 participant