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

[expr.unary.op] p10 The operand should be the promoted operand #5815

Open
xmh0511 opened this issue Sep 7, 2022 · 0 comments
Open

[expr.unary.op] p10 The operand should be the promoted operand #5815

xmh0511 opened this issue Sep 7, 2022 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Sep 7, 2022

[expr.unary.op] p10 says

The operand of ~ shall have integral or unscoped enumeration type; the result is the ones' complement of its operand. Integral promotions are performed. The type of the result is the type of the promoted operand.

What is the operand refers to? It is more clear if we say

The operand of ~ shall have integral or unscoped enumeration type. Integral promotions are performed on the operand. The result is the ones' complement of the (possible promoted) operand. The type of the result is the type of the promoted operand.

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

No branches or pull requests

1 participant