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.ref] Constructors not mentioned when user-defined conversions are used #3217

Open
sdkrystian opened this issue Sep 8, 2019 · 1 comment
Labels
cwg Issue must be reviewed by CWG.

Comments

@sdkrystian
Copy link
Contributor

[dcl.init.ref] subclause 5.4.1 says:

If T1 or T2 is a class type and T1 is not reference-related to T2, user-defined conversions are considered using the rules for copy-initialization of an object of type “cv1 T1” by user-defined conversion; the program is ill-formed if the corresponding non-reference copy-initialization would be ill-formed. The result of the call to the conversion function, as described for the non-reference copy-initialization, is then used to direct-initialize the reference. For this direct-initialization, user-defined conversions are not considered.

It states that used-defined conversions are considered (using the rules for copy-initialization of an object), however, it only specifies what will happen when a conversion function is chosen, and there is no mention of what would happen if a constructor is chosen.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Sep 10, 2019
@jensmaurer jensmaurer added cwg Issue must be reviewed by CWG. and removed decision-required A decision of the editorial group (or the Project Editor) is required. labels Sep 30, 2019
@jensmaurer
Copy link
Member

Editorial teleconference: Have CWG clarify.

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