This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
[Accepted as a DR at the February, 2023 meeting.]
P2720R0 comment US 7-035T and C are used inconsistently throughout these paragraphs.
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]
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 (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.