Two conflict notes about member lookup occurred in base-specifier
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
@opensdh
[basic.scope.class#note-1]
[Note 1: Lookup from a program point before the class-specifier of a class will find no bindings in the class scope.
[Example 1:
template < class D >
struct B {
D::type x; // #1
};
struct A { using type = int; };
struct C : A, B< C > {}; // error at #1: C::type not found.— end example]
— end note]
The note and the example state that the member lookup from a program point P at a base-specifier cannot find any member.
However, the note [class.member.lookup#note-2] gives a different conclusion, that is
[Note 2: If T is incomplete, only base classes whose base-specifier appears before P are considered. If T is an instantiated class, its base classes are not dependent. — end note]
It seems like the base class A could be considered since it appears before point P in B<C>. In addition, except that P occurs in "base-specifier-list", I cannot figure out a case that there is a base class that can appear after P.
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 [basic.scope.class#note-1] and [class.member.lookup#note-2] in the draft, including the cited base-specifier example. Compare their lookup rules and determine what wording or example change would reconcile the apparent conflict; done means the two notes give consistent conclusions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, tex
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100