[dcl.init.list p3.10 The prvalue mentioned in the initialization of the reference abruptly appears without any specification
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[dcl.init.list p3.10 says
Otherwise, if T is a reference type, a prvalue is generated. The prvalue initializes its result object by copy-list-initialization. The prvalue is then used to direct-initialize the reference.
The rule only says two things:
- Generate a prvalue.
- The effect of the prvalue(how it initializes the result object).
We didn't tell the story about how the prvalue was generated/ formed. Moreover, there is a case that the prvalue cannot be formed at all. It ought to be that we should associate the prvalue with the rules regarding copy-list-initialization. The suggestion might be:
Otherwise, if T is a reference type, an invented declaration
U x = H;is introduced, whereUis the referenced type andHis the initializer list; the program is ill-formed if the copy-list-initialization is ill-formed. The invented variablexis a prvalue.xis then used to direct-initialize the reference.
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.list] paragraph 3.10 and read the referenced copy-list-initialization rules. Done means the standard wording explains how the prvalue is formed and covers the case where that initialization is ill-formed, without leaving the proposed semantics implicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100