[stmt.dcl] p3 Improve the contradictory wording
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[stmt.dcl] p3 says
Dynamic initialization of a block variable with static storage duration or thread storage duration is performed the first time control passes through its declaration; such a variable is considered initialized upon the completion of its initialization. If the initialization exits by throwing an exception, the initialization is not complete, so it will be tried again the next time control enters the declaration.
Presumably, once the initialization of such a variable is complete, the variable will not be initialized even though the control passes through its declaration. However, this meaning is not clear in the current wording. Moreover, the next time control(i.e. not the first time) case contradicts "the first time control passes". It reads not nature since we rigidly redefine the re-enter case(i.e. the initialization is not complete). The suggestion might be:
Dynamic initialization of a block variable with static storage duration or thread storage duration is performed if the
first timecontrol passes through its declaration and either
- the variable has not been yet initialized, or
- its initialization is not complete
such a variable is considered initialized upon the completion of its initialization. If the initialization exits by throwing an exception, the initialization is not complete.
[note: so the initialization will be tried again the next time control enters the declaration — end note]
This might be clearer.
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
Search the draft sources for the quoted [stmt.dcl] p3 wording and read the surrounding paragraph. Revise the paragraph so the initial and retry conditions are consistent, then verify the rendered clause no longer contradicts itself.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, tex
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100