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

[diff.library] Consistency for wide char types #3189

Merged
merged 1 commit into from Oct 6, 2019

Conversation

danra
Copy link
Collaborator

@danra danra commented Aug 21, 2019

[diff.char16] says char16_t and char_32t

...do not appear as macro names...

[diff.wchar.t] says wchar_t

...does not appear as a type name...

It would be nice to make these consistent if there is no reason for the difference. I thought there might not be because I saw at least one implementation in which char16_t and char_32t are typedefs rather than macros.

@jensmaurer
Copy link
Member

ISO C11 section 7.19 says wchar_t is a declared type (and goes on to talk about other things as macros, so this is hardly an oversight).

ISO C11 section 7.28 says char16_t and char32_t are "declared" types.

However, ISO C11 section 7.1.3 clearly says that all global identifiers from header files are reserved for macro use.

@jensmaurer
Copy link
Member

I think we want "macro or type name" in our updated wording, highlighting both facts. For C++, both the facts that this is not a macro and that it's not a typedef (to some existing type, hampering differentiation in overload resolution) are important.

@jensmaurer jensmaurer added the changes requested Changes to the wording or approach have been requested and not yet applied. label Aug 27, 2019
@danra
Copy link
Collaborator Author

danra commented Aug 27, 2019 via email

@danra
Copy link
Collaborator Author

danra commented Aug 27, 2019

Pushed changes.

@jensmaurer jensmaurer added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Sep 30, 2019
@jensmaurer
Copy link
Member

Please rebase and fix the conflicts, then force-push.

@danra
Copy link
Collaborator Author

danra commented Oct 2, 2019

Rebased.

@jensmaurer jensmaurer removed changes requested Changes to the wording or approach have been requested and not yet applied. needs rebase The pull request needs a git rebase to resolve merge conflicts. labels Oct 2, 2019
@danra
Copy link
Collaborator Author

danra commented Oct 2, 2019

Hmm, it looks like in the rebase I accidentally pushed just "type names", not "macro or type names". Rebasing and force-pushing.

[diff.char16] says `char16_t` and `char_32t`
> ...do not appear as *macro* names...

[diff.wchar.t] says `wchar_t`
> ...does not appear as a *type* name...

It would be nice to make these consistent if there is no reason for the difference. I thought there might not be because I saw at least one implementation in which `char16_t` and `char_32t` are `typedef`s rather than macros.
@zygoloid zygoloid merged commit 37cc5af into cplusplus:master Oct 6, 2019
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.

None yet

3 participants