Skip to content
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

[pointer] Make "at least" machinery generic #1166

Merged
merged 1 commit into from
May 2, 2024
Merged

[pointer] Make "at least" machinery generic #1166

merged 1 commit into from
May 2, 2024

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented May 2, 2024

This replaces at_least::Xxx with AtLeast<Xxx>, which in turn allows us to write AtLeast<T> in a context where T is generic.

The use case in this commit is to relax the bound on Copy and Clone to:

Shared: AtLeast<I::Aliasing>

...which is equivalent to saying that I::Aliasing is at most Shared. This permits both Shared and Any Ptrs to be copied or cloned.

@joshlf joshlf requested a review from jswrenn May 2, 2024 19:34
@joshlf joshlf enabled auto-merge May 2, 2024 19:34
This replaces `at_least::Xxx` with `AtLeast<Xxx>`, which in turn allows
us to write `AtLeast<T>` in a context where `T` is generic.

The use case in this commit is to relax the bound on `Copy` and `Clone`
to:

  Shared: AtLeast<I::Aliasing>

...which is equivalent to saying that `I::Aliasing` is at *most*
`Shared`. This permits both `Shared` and `Any` `Ptr`s to be copied or
cloned.

Co-authored-by: Jack Wrenn <jswrenn@amazon.com>
@joshlf joshlf added this pull request to the merge queue May 2, 2024
Merged via the queue into main with commit 6209d6e May 2, 2024
210 checks passed
@joshlf joshlf deleted the ptr-at-least branch May 2, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants