-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Rewrite docs for std::ptr
#49767
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
Merged
Merged
Rewrite docs for std::ptr
#49767
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8b8091d
Rewrite docs for `std::ptr`
ecstatic-morse ee259e4
Change `write_bytes` test causing UB to `no_run`
ecstatic-morse b564c4a
Fix example for `ptr::replace`
ecstatic-morse 6eceb94
Don't link "Undefined Behavior" heading
ecstatic-morse 422b616
Fix broken link in `write_unaligned` docs
ecstatic-morse d7ce9a2
Fix broken relative links
ecstatic-morse d7209d5
Fix various nits from PR review
ecstatic-morse e350ba4
Use the "Safety" heading instead of "Undefined Behavior"
827251e
Shorten ownership safety discussion in `read_volatile`
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Change
write_bytes
test causing UB to no_run
This also fixes improper text wrapping.
- Loading branch information
commit ee259e4dd340f9532511b7249e4eb961f111b63f
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be at the top, since all the other conditions are just "things that are true of any pointer accesses" (which suggests to me that they can potentially be omitted or centralized in the top-level module documentation and just linked?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be a good idea to document the requirements for stores and loads at the top-level. My concern was that people coming to the docs from a search engine may not see the top-level documentation. There was also talk in #36450 of specifying alignment requirements for every function in
std::ptr
.I'd like some clarification on what the precise requirements for loads and stores are regarding initializing memory, and what the precise definition of "valid" memory is.