-
Notifications
You must be signed in to change notification settings - Fork 198
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
Bug 559318 - construct via initialisation list with single item #448
Conversation
The test failures don't seem to have anything to do with the change, which is relatively small :( |
cf71d4c
to
90661ef
Compare
Sorry that no one has been able to review this yet. The language part of CDT is outside my depth of knowledge normally, but if no one else is able to review this soon I will try to find time to review it myself. There has recently been a regression in test results which appears to be caused by updating dependencies or something else external. See #454 |
Thanks @jonahgraham . I have a number of other fixes lined up as well, but I will hold off on creating PRs for those until these have gone through, to keep it easier to manage (also for myself). |
90661ef
to
b760403
Compare
Hi @jonahgraham - I have rebased on current main. There is still a test failure, but it still looks unrelated to my changes (though different from last time). |
Add the special case handling from [dcl.list.init] so that a class object can be constructed using an initialisation list with a single item of the same type (or subclass type). This is not a complete fix for all cases of initialisation lists (in particular string literals aren't handled) but it should help for the case identified in the bug.
b760403
to
f09ac5a
Compare
... |
I now added a PR which fixes this particular issue with single list item of same class type, and also handles other places where list-initialization sequence needs more careful processing. Please compare #581 - there are few more tests added too. |
I'm happy for this PR to be closed in preference to #581 |
Closing this in favour of #581 |
Add the special case handling from [dcl.list.init] so that a class object can be constructed using an initialisation list with a single item of the same type (or subclass type).
This is not a complete fix for all cases of initialisation lists (in particular string literals aren't handled) but it should help for the case identified in the bug.