[basic.stc] Temporary object and its storage duration CWG1634
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[basic.stc.general] p2
Static, thread, and automatic storage durations are associated with objects introduced by declarations ([basic.def]) and implicitly created by the implementation.
The rule explicitly says a temporary object can have a storage duration. However, in the subsequent subclause, the [basic.stc.static], [basic.stc.thread] and [basic.stc.auto] do not state what storage duration the temporary object should have. It only applies to variables.
Since [basic.pre] p6 says
A variable is introduced by the declaration of a reference other than a non-static data member or of an object. The variable's name, if any, denotes the reference or object.
The temporary object is never introduced by a declaration but is created in order to satisfy the requirement of a language construct. Hence, a temporary object is not a variable. This issue is also discussed at https://stackoverflow.com/questions/47945299/what-is-a-temporary-object-with-static-storage-duration
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 by reading the cited [basic.stc.general], [basic.stc.static], [basic.stc.thread], [basic.stc.auto], and [basic.pre] paragraphs, then review the linked Stack Overflow discussion. Determine what wording or cross-reference is needed to specify temporary-object storage duration, and consider the issue resolved when the relevant standard text is unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100