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

[format.string.std] where does the "0x" base prefix for pointers get added? #5817

Closed
jwakely opened this issue Sep 7, 2022 · 0 comments · Fixed by #5850
Closed

[format.string.std] where does the "0x" base prefix for pointers get added? #5817

jwakely opened this issue Sep 7, 2022 · 0 comments · Fixed by #5850
Assignees

Comments

@jwakely
Copy link
Member

jwakely commented Sep 7, 2022

For integers we're clear where the base prefix is inserted (which is important, because it's between a minus sign and the digits, not right at the start):

For integral types, the alternate form inserts the base prefix (if any) specified in Table 69 into the output after the sign character (possibly space) if there is one, or before the output of to_chars otherwise

For pointers, Table 73 just says "with the prefix 0x added to the output". Obviously, a prefix should be at the start (and there's no minus sign to worry about) but it might be better to be explicit, especially as the text about the prefix comes after saying we use to_chars.

Tim suggested something like "inserted before the output of to_chars."

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 a pull request may close this issue.

2 participants