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.init.aggr] Bad phrase "empty initializer list" #2335

Closed
h0nzZik opened this issue Sep 18, 2018 · 3 comments
Closed

[dcl.init.aggr] Bad phrase "empty initializer list" #2335

h0nzZik opened this issue Sep 18, 2018 · 3 comments
Assignees

Comments

@h0nzZik
Copy link

h0nzZik commented Sep 18, 2018

The section [dcl.init.aggr] uses the phrases "empty initializer list" and "empty initializer-list" (paragraphs 5.2, 5.5, 9, and the footnote in paragraph 9). It may be in another places, too. I believe the phrase is nonsensical, since initializer-list as defined by the grammar in paragraph 1 of [dcl.init] can be never empty. Also, the paragraph 9 of [dcl.init.aggr] talks about

[...] empty initializer list {} [...]

I guess that it should talk about braced-init-list, not about initializer-list.

@jensmaurer
Copy link
Member

jensmaurer commented Sep 18, 2018

I agree this should say "empty braced-init-list", although "initializer list" reads nicer.

@jensmaurer jensmaurer changed the title Bad phrase "empty initializer list" [dcl.init.aggr] Bad phrase "empty initializer list" Sep 18, 2018
@cpplearner
Copy link
Contributor

cpplearner commented Sep 18, 2018

Per [dcl.init.list]/1, an initializer list is a braced-init-list used as an initializer:

List-initialization is initialization of an object or reference from a braced-init-list. Such an initializer is called an initializer list, and the comma-separated initializer-clauses of the initializer-list or designated-initializer-clauses of the designated-initializer-list are called the elements of the initializer list. An initializer list may be empty.

@jensmaurer
Copy link
Member

Good point. So, the phrasing is good as-is; the only remaining issue is whether we anywhere talk about an "empty initializer-list", which would not make sense. Ah, the footnote in [dcl.init.aggr] does that, so that is the only place that needs fixing.

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

3 participants