[basic.scope.scope] The meaning of "denote different entities" is vague
@jensmaurer is already working on this.
Since Aug 21, 2021.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
Two declarations potentially conflict if they correspond and cause their shared name to denote different entities ([basic.link]).
Since [basic.link] follows "different entities", it hints that the meaning of "different entities" is given in [basic.link#8]. Consider this example
void fun();
extern int fun;
According to [basic.scope.scope#3], such two declarations correspond, and according to [basic.link#8], they declare the same entity. According to [basic#pre-5]
An entity E is denoted by the name (if any) that is introduced by a declaration of E or by a typedef-name introduced by a declaration specifying E.
Since these two declarations declare the same entity, does it mean the names fun in the two declarations denote the same entity? However, according to [basic#pre-3]
An entity is a value, object, reference, structured binding, function, enumerator, type, class member, bit-field, template, template specialization, namespace, or pack.
How can a function and a variable be the same entity? It seems result in this issue. That is, what's the exact meaning of "denote different entities"? Merely determined by [basic.link#8] or should base it on by adding some other restrictions?
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.
Assessment
This issue has not been assessed yet.