[basic.scope.block] p1 The note should be as a normative rule
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
Each
- selection or iteration statement ([stmt.select], [stmt.iter]),
- substatement of such a statement,
- handler ([except.pre]), or
- compound statement ([stmt.block]) that is not the compound-statement of a handler
introduces a block scope that includes that statement or handler.
[Note 1: A substatement that is also a block has only one scope. — end note]
Isn't that note should be phrased as a normative rule? My proposal is that
Each
- [...]
- substatement of such a statement that is not a compound-statement,
- [...]
- compound statement ([stmt.block]) that is not the compound-statement of a handler
introduces a block scope that includes that statement or handler.
[Note 1: A substatement that is also a block has only one scope. — end note].
if(true) {
}
The substatement is a compound-statement, hence the second bullet does not apply but the last bullet does, which means the substatement only introduced one block scope.
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 reviewing the quoted [basic.scope.block] wording and the proposed change to the substatement bullet. Check how the example if(true) {} is covered by each bullet and whether the wording states the intended single-scope rule normatively. Done means the adopted wording is precise and consistent with the surrounding standard text.
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
- Clearly specified
- Newbie friendliness
- 35/100