Created on 2022-11-03.00:00:00 last changed 16 months ago
Proposed resolution (approved by CWG 2023-01-06):
Change in 6.5.2 [class.member.lookup] paragraph 1 as follows:
A search in a scope X for a nameNM from a program point P is a single search in X forNM from P unless X is the scope of a class or class template T, in which case the following steps define the result of the search. [Note 1: The result differs only ifNM is a conversion-function-id or if the single search would find nothing. —end note]
Change in 6.5.2 [class.member.lookup] paragraph 2 as follows:
The lookup set for a name N in a class or class template C, called S(N, C), consists of two component sets: the declaration set, a set of members named N ; and the subobject set, a set of subobjects where declarations of these members were found (possibly via using-declarations). In the declaration set, type declarations (including injected-class-names) are replaced by the types they designate. S(N, C) is calculated as follows:
Change in 6.5.2 [class.member.lookup] paragraph 4 as follows:
... [Note 2: IfTC is incomplete, only base classes whose base-specifier appears before P are considered. IfTC is an instantiated class, its base classes are not dependent. —end note]
Change in 6.5.2 [class.member.lookup] paragraph 6 as follows:
The result of the search is the declaration set of S(NM, T). If it is an invalid set, the program is ill-formed. If it differs from the result of a search in T forNM in a complete-class context (11.4 [class.mem]) of T , the program is ill-formed, no diagnostic required.
Change in 6.5.2 [class.member.lookup] paragraph 7 as follows:
IfNM is a non-dependent conversion-function-id, conversion function templates that are members of T are considered. For each such template F, the lookup set S(t, T) is constructed, considering a function template declaration to have the name t only if it corresponds to a declaration of F (6.4.1 [basic.scope.scope]). The members of the declaration set of each such lookup set, which shall not be an invalid set, are included in the result.
CWG 2022-12-02
The resolution proposed above is incorrect: T is the parameter for the overall search and C is the parameter for the S(N,C) construction. Highlight that fact in paragraph 2.
Proposed resolution [SUPERSEDED]:
Change in 6.5.2 [class.member.lookup] paragraph 1 as follows:
A search in a scope X for a name N from a program point P is a single search in X for N from P unless X is the scope of a class or class templateTC, in which case the following steps define the result of the search.
Change in 6.5.2 [class.member.lookup] paragraph 4 as follows:
[Note 2: IfTC is incomplete, only base classes whose base-specifier appears before P are considered. IfTC is an instantiated class, its base classes are not dependent. —end note]
Change in 6.5.2 [class.member.lookup] paragraph 6 as follows:
The result of the search is the declaration set of S(N,TC). If it is an invalid set, the program is ill-formed. If it differs from the result of a search inTC for N in a complete-class context (11.4 [class.mem]) ofTC, the program is ill-formed, no diagnostic required.
Change in 6.5.2 [class.member.lookup] paragraph 7 as follows:
If N is a non-dependent conversion-function-id, conversion function templates that are members ofTC are considered. For each such template F, the lookup set S(t,TC) is constructed, considering a function template declaration to have the name t only if it corresponds to a declaration of F (6.4.1 [basic.scope.scope]).
Change in 6.5.2 [class.member.lookup] paragraph 8 as follows:
[Note 4: A static member, a nested type or an enumerator defined in a base classTB can unambiguously be found even if an object has more than one base class subobject of typeTB. Two base class subobjects share the non-static member subobjects of their common virtual base classes. —end note]
[Accepted as a DR at the February, 2023 meeting.]
P2720R0 comment US 7-035T and C are used inconsistently throughout these paragraphs.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-07-16 13:00:43 | admin | set | status: open -> c++23 |
2023-07-16 13:00:43 | admin | set | status: dr -> open |
2023-02-18 18:43:04 | admin | set | status: ready -> dr |
2023-01-07 14:04:02 | admin | set | messages: + msg7116 |
2023-01-07 14:04:02 | admin | set | status: review -> ready |
2022-12-03 19:11:33 | admin | set | messages: + msg7075 |
2022-11-27 21:00:51 | admin | set | status: dr -> review |
2022-11-25 05:14:04 | admin | set | status: nb -> dr |
2022-11-08 07:00:55 | admin | set | status: review -> nb |
2022-11-08 07:00:55 | admin | set | status: review -> review |
2022-11-08 07:00:55 | admin | set | status: review -> review |
2022-11-08 07:00:55 | admin | set | status: review -> review |
2022-11-08 07:00:55 | admin | set | status: review -> review |
2022-11-08 07:00:55 | admin | set | messages: + msg6971 |
2022-11-08 07:00:55 | admin | set | status: review -> review |
2022-11-07 21:52:17 | admin | set | status: open -> review |
2022-11-07 21:52:17 | admin | set | status: open -> open |
2022-11-07 21:52:17 | admin | set | status: open -> open |
2022-11-07 21:52:17 | admin | set | status: open -> open |
2022-11-07 21:52:17 | admin | set | status: open -> open |
2022-11-07 21:52:17 | admin | set | status: open -> open |
2022-11-07 13:18:36 | admin | set | status: nb -> open |
2022-11-07 13:18:36 | admin | set | status: nb -> nb |
2022-11-07 13:18:36 | admin | set | status: nb -> nb |
2022-11-03 00:00:00 | admin | create |