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

P1147R1 Printing volatile Pointers #5017

Merged
merged 1 commit into from Oct 19, 2021
Merged

P1147R1 Printing volatile Pointers #5017

merged 1 commit into from Oct 19, 2021

Conversation

jensmaurer
Copy link
Member

Moved to [ostream.inserters.arithmetic] and renamed the parameter
from 'val' to 'p' for consistency with the 'const void*' overload.

Fixes #4981
Fixes cplusplus/papers#320

Moved to [ostream.inserters.arithmetic] and renamed the parameter
from 'val' to 'p' for consistency with the 'const void*' overload.
@jensmaurer jensmaurer added this to the post-2021-10 milestone Oct 9, 2021
Copy link
Contributor

@burblebee burblebee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's combine \itemdecls; looks odd having the new member all by itself. Otherwise lgtm.

@@ -6419,6 +6420,17 @@
\tcode{*this}.
\end{itemdescr}

\indexlibrarymember{operator<<}{basic_ostream}%
\begin{itemdecl}
basic_ostream& operator<<(const volatile void* p);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use "val" instead of "p" and combine this with the previous itemdecl, similar to how the non-volitile "val" version was?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't combine with the previous \itemdecl, because the \itemdescr is totally different.
"val" is used for the other overloads because these are "arithmetic inserters", but I do believe since we have a separate \itemdecl, we might as well use the more idiomatic "p" for a pointer value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit awkward that the current const void* overload uses p in the header synopsis but val in the description, but regardless, using p in both places for the new overload seems good.

@jensmaurer jensmaurer added changes requested Changes to the wording or approach have been requested and not yet applied. and removed changes requested Changes to the wording or approach have been requested and not yet applied. labels Oct 16, 2021
@tkoeppe tkoeppe merged commit a81b02a into main Oct 19, 2021
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.

[2021-10 LWG Motion 10] P1147R1 Printing volatile Pointers P1147 Printing volatile Pointers
3 participants