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

Definition of copy-initialization doesn't obviously include copy-list-initialization #333

Closed
jacobsa opened this issue Jun 19, 2014 · 4 comments
Labels
cwg Issue must be reviewed by CWG.

Comments

@jacobsa
Copy link
Contributor

jacobsa commented Jun 19, 2014

(The version I'm looking at is N3936.)

[dcl.init]/15 talks about initialization of the form

T x = a;

while [dcl.init]/16 shows the forms

T x(a);
T x{a};

These are not precisely defined using the grammar from [dcl.init]/1, but I
assume that the first form is supposed to also cover copy-list-initialization
of the form

T x = {a};

Is that correct? If so, it seems like it should be listed in paragraph 15. In
any case, it may be worth either making these both more precise by referring
to the grammar defined above.

@zygoloid
Copy link
Member

The intent is that

T x = {blah, blah};

is covered by

T x = a;

where a is {blah, blah}. This is a little sloppy, though I'm not sure how best to fix it. Everything other than the = here is a placeholder for a loosely-defined hunk of the grammar.

@jacobsa
Copy link
Contributor Author

jacobsa commented Jun 19, 2014

Thanks for the reply. Yep, that is what I imagined (though I neglected empty and multi-element lists). My recommendation would be to make it precise by reference to the grammar above, but maybe that is too cumbersome?

@zygoloid zygoloid added the cwg label Jun 21, 2014
@zygoloid
Copy link
Member

This will be fixed by core issue 1633.

@jacobsa
Copy link
Contributor Author

jacobsa commented Jun 22, 2014

Assuming you're talking about this, looks good to me; thanks! Has it been accepted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG.
Projects
None yet
Development

No branches or pull requests

2 participants