cplusplus / cplusplus/draft

[basic.pre] unintended re-definition of `declaration`

Open
#6,753 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P3-Other
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

It seems to me that 6.1.5 is formulated in a way that suggest that the sentence is actually a definition of declaration - and it is not:

Every name is introduced by a declaration, which is a [...]

According my interpretation of this Grammarly blog post, the ", which is a [...]" part is a nonrestrictive clause. That means that the sentence should make sense even without it, and the clause should only add some additional information. So the sentence is equivalent to saying

Every name is introduced by a declaration. By the way, a declaration is a [...]

But then (1) we would have two definitions of what a declaration is, and (2) we would not restrict which kinds of declarations can introduce names. This would be in contrast with what I am guessing is the intended meaning of the sentence - that is, to define the "can-introduce-a-name" property of declaration. In my opinion, the sentence should go like this:

Every name is introduced by a declaration that is a [...]

(that is, we should use a restrictive clause).

Disclaimer: I am not a native English speaker.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the wording in C++ draft section 6.1.5 and the linked definition of declaration. Check whether the sentence's relative clause is restrictive and whether it limits which declarations introduce names. Done means the wording expresses the intended restriction without suggesting a second definition.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, tex
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.