[class.temporary] Clarify wording for lifetime of temporaries.
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
Current wording
As far as I know "(lexically) contained" is not defined.
The presence of "lexically" here is especially confusing in the light of this note:
Intent
I think the intent is pretty clear in light of the subexpression wording and corresponding examples that the lifetime of a temporary should be solely be determined by the corresponding full-expression of the temporary materialization conversion subexpression that initialized it. Any "lexical" relationship is incidental.
Suggested wording
I think the [class.temporary] wording can be expressed purely with subexpressions, like so:
At the end of a full-expression temporaries that are initialized by temporary materialization conversion [conv.rval] subexpressions are destroyed.
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
Read source/basic.tex around the linked [class.temporary] wording and compare it with the note around the second linked location. Check the suggested subexpression-based wording against the surrounding examples and terminology. Done means the lifetime rule no longer relies on unclear “lexically contained” wording and remains consistent with the cited material.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, tex
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100