This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-11-05
[Voted into WP at April 2003 meeting.]
A use of an injected-class-name in an elaborated-type-specifiershould not name the constructor of the class, but rather the class itself,because in that context we know that we're looking for a type.Seeissue 147.
Proposed Resolution (revised October 2002):
This clarifies the changes made in the TC for issue 147.
In 6.5.5.2 [class.qual] paragraph 1a replace:
If thenested-name-specifier nominates a class C, and the namespecified after thenested-name-specifier, when looked up in C, is theinjected class name of C (Clause 11 [class]), the name is insteadconsidered to name the constructor of class C.
with
In a lookup in which the constructor is an acceptable lookup result,if thenested-name-specifier nominates a class C and the namespecified after thenested-name-specifier, when looked up in C, is theinjected class name of C (Clause 11 [class]), the name isinstead considered to name the constructor of class C.[Note: For example, the constructor is not an acceptable lookup result in anelaborated type specifier so the constructor would not be used in placeof the injected class name.]
Note thatissue 263 updates a part of thesame paragraph.
Append to the example:
struct A::A a2; // object of type A