[dcl.init.ref] Constructors not mentioned when user-defined conversions are used
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[dcl.init.ref] subclause 5.4.1 says:
If
T1orT2is a class type andT1is not reference-related toT2, 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with [dcl.init.ref] subclause 5.4.1 and compare its description of user-defined conversions with the referenced copy-initialization rules. Determine how the wording should address the case where a constructor is chosen, then verify that the clause clearly specifies the resulting reference initialization behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100