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.sizeof][expr.alignof][expr.unary.noexcept] What is a constant? #2671

Closed
Rakete1111 opened this issue Feb 17, 2019 · 2 comments · Fixed by #2902
Closed

[expr.sizeof][expr.alignof][expr.unary.noexcept] What is a constant? #2671

Rakete1111 opened this issue Feb 17, 2019 · 2 comments · Fixed by #2902
Assignees

Comments

@Rakete1111
Copy link
Contributor

[expr.sizeof]p6:

The result of sizeof and sizeof... is a constant of type std::size_­t.

[expr.alignof]p2:

The result is an integral constant of type std::size_­t.

[expr.unary.noexcept]p2:

The result of the noexcept operator is a constant of type bool and is a prvalue.

I can't find a definition of constant anywhere. It seems like it is supposed to mean an integral constant expression.

Also the first two miss saying what the value category of the result is.

@languagelawyer
Copy link
Contributor

Lotsa operators miss requirements for value category of operands and don't specify value category of the resulting expression. It was noticed long time ago https://groups.google.com/a/isocpp.org/d/msg/std-discussion/sjK_KoeD3xo/a55uY-Q4q5kJ

@jensmaurer
Copy link
Member

Let's fix these three situations as a first step.

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.

3 participants