Title
struct A::A should not name the constructor of A
Status
cd1
Section
6.5.5.2 [class.qual]
Submitter
John Spicer

Created on 2001-10-18.00:00:00 last changed 197 months ago

Messages

Date: 2003-04-15.00:00:00

[Voted into WP at April 2003 meeting.]

Date: 2002-10-15.00:00:00

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 the nested-name-specifier nominates a class C, and the name specified after the nested-name-specifier, when looked up in C, is the injected class name of C (Clause 11 [class]), the name is instead considered to name the constructor of class C.

with

In a lookup in which the constructor is an acceptable lookup result, if the nested-name-specifier nominates a class C and the name specified after the nested-name-specifier, when looked up in C, is the injected class name of C (Clause 11 [class]), the name is instead considered to name the constructor of class C. [Note: For example, the constructor is not an acceptable lookup result in an elaborated type specifier so the constructor would not be used in place of the injected class name.]

Note that issue 263 updates a part of the same paragraph.

Append to the example:

  struct A::A a2;  // object of type A
Date: 2001-10-18.00:00:00

A use of an injected-class-name in an elaborated-type-specifier should 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. See issue 147.

History
Date User Action Args
2008-10-05 00:00:00adminsetstatus: wp -> cd1
2003-04-25 00:00:00adminsetmessages: + msg856
2003-04-25 00:00:00adminsetstatus: ready -> wp
2002-11-08 00:00:00adminsetstatus: review -> ready
2002-05-10 00:00:00adminsetmessages: + msg618
2002-05-10 00:00:00adminsetstatus: open -> review
2001-10-18 00:00:00admincreate