Created on 2022-05-02.00:00:00 last changed 27 months ago
Proposed resolution (approved by CWG 2022-05-06):
Change in 6.5.2 [class.member.lookup] paragraph 6 as follows:
If it differs from the result of a search in T for Nfrom immediately after the class-specifierin a complete-class context of T, the program is ill-formed, no diagnostic required.
[Accepted at the July, 2022 meeting.]
Consider:
typedef int T;
struct A {
struct B {
static T t;
};
typedef float T; // IFNDR?
};
Subclause 6.5.2 [class.member.lookup] paragraph 6 specifies:
The result of the search is the declaration set of S(N, T). If it is an invalid set, the program is ill-formed. If it differs from the result of a search in T for N from immediately after the class-specifier of T, the program is ill-formed, no diagnostic required.
It is unclear whether the lookup of T inside A::B is subject to the "if it differs" rule, given that the class-specifier of A::B ends before introducing A::T.
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-08-19 07:54:33 | admin | set | status: ready -> cd6 |
2022-05-06 20:24:57 | admin | set | status: open -> ready |
2022-05-02 16:09:03 | admin | set | messages: + msg6821 |
2022-05-02 00:00:00 | admin | create |