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.type.conv] doesn't define T() for T ≠ void #4566
Comments
Because |
Paragraph 1 seems to include |
This has been raised before. Not sure if in another issue, a CWG issue, or perhaps an r/cpp comment. |
Isn't that
covers such a case?
That means it could be the form T(expression-list opt). |
Yes, I think so. For example, for I don't see a problem here. |
Thanks for the hint, [dcl.init.general]/15.4 is what I've been looking for. Sorry for bothering you with this, I wrongly assumed that |
Let's go through the second paragraph point by point:
void
and the initializer is()
or{}
(after pack expansion, if any), the expression is a prvalue of type void that performs no initialization." That is definingvoid()
.T{}
but notT()
because an expression-list, unless I'm misreading something, cannot be empty.What seems to be missing is that
T()
does a value initialization.The text was updated successfully, but these errors were encountered: