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

List initialization clause appears to exclude form with equals sign #332

Closed
jacobsa opened this issue Jun 19, 2014 · 2 comments
Closed

List initialization clause appears to exclude form with equals sign #332

jacobsa opened this issue Jun 19, 2014 · 2 comments

Comments

@jacobsa
Copy link
Contributor

jacobsa commented Jun 19, 2014

[dcl.init]/17 in N3936 says the following:

If the initializer is a (non-parenthesized) braced-init-list, the
object or reference is list-initialized (8.5.4).

According to the grammar in [dcl.init]/1, that should certainly cover this
case:

T f{17};

I infer that this is also supposed to cover the generally equivalent case:

T f = {17};

However, according to the grammar the initializer in this case is not a
braced-init-list but rather an equals sign followed by a braced-init-list
(there is no category for this that excludes an assignment-expression).

Am I correct in thinking that the latter syntax is supposed to be covered by
the quoted clause? If so, perhaps the wording should be made more precise.

@jensmaurer
Copy link
Member

We seem to be inconsistent in our use of "initializer" in this paragraph.

@jacobsa
Copy link
Contributor Author

jacobsa commented Nov 13, 2016

Thanks!

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

2 participants