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

[dcl.array] Clarify that an array bound is deduced in an explicit typ… #2019

Merged
merged 1 commit into from May 7, 2018

Conversation

jensmaurer
Copy link
Member

…e conversion.

Fixes #2012.

@jensmaurer jensmaurer requested a review from zygoloid April 3, 2018 20:59
@jensmaurer
Copy link
Member Author

@zygoloid, please decide whether that is editorial or not. Implementations seem to agree on the intent of the wording.

@cpplearner
Copy link
Contributor

I'm actually confused by [dcl.array]/3 (unrelated to #2012). Consider int (*p)[] = {0};. It has an array declarator ((*p)[]), which is followed by an initializer (= {0}). Does it mean that the array bound should be deduced?

@jensmaurer
Copy link
Member Author

@cpplearner: The point here is that we're not actually initializing an array object. I agree that could be clearer in the wording.

@zygoloid
Copy link
Member

zygoloid commented May 7, 2018

I'm not comfortable with making this change editorially, and would like CWG to explicitly consider it. (And CWG should also consider whether new-expressions should get the same treatment.)

@zygoloid zygoloid added the cwg Issue must be reviewed by CWG. label May 7, 2018
@cpplearner
Copy link
Contributor

I just found CWG 1525 which seems to suggest that [dcl.init.aggr] should apply in an explicit type cast.

@zygoloid
Copy link
Member

zygoloid commented May 7, 2018

OK, that's good enough for me.

@zygoloid zygoloid removed the cwg Issue must be reviewed by CWG. label May 7, 2018
@zygoloid zygoloid merged commit c35c5e3 into cplusplus:master May 7, 2018
@jensmaurer jensmaurer added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label May 7, 2018
@jensmaurer jensmaurer deleted the b8 branch May 7, 2018 19:03
@jensmaurer jensmaurer removed the needs rebase The pull request needs a git rebase to resolve merge conflicts. label May 7, 2018
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