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

[over.ics.list] p9 The cross-referenced subclause [over.ics.ref] does not touch an non-expression initializer #5463

Open
xmh0511 opened this issue May 11, 2022 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented May 11, 2022

[over.ics.list] p9 says

Otherwise, if the parameter is a reference, see [over.ics.ref].

However, [over.ics.ref] does not cover the case where the initializer is not an expression. Even the subclause [dcl.ref] is based on the initializer expression.

So, the cross-referenced subclause says nothing about the case where the initializer is an initializer list. The change to [over.ics.list] p9 might be

Otherwise, if the parameter is a reference, the conversion sequence is the one required to convert the initializer list to the referenced type.

This means the other rules other than [over.ics.list] p9 can define the conversion sequence for this case, which conforms to what the note after [over.ics.list] wants to say

The rules in this subclause will apply for initializing the underlying temporary for the reference.

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

1 participant