Title
Dependent nested-name-specifier in a pointer-to-member declarator
Status
c++11
Section
13.8 [temp.res]
Submitter
GB

Created on 2010-08-03.00:00:00 last changed 130 months ago

Messages

Date: 2010-11-15.00:00:00

[Voted into the WP at the November, 2010 meeting.]

Date: 2010-08-15.00:00:00

Proposed resolution (August, 2010):

Change 13.8 [temp.res] paragraph 5 as follows:

A qualified name used as the name in a mem-initializer-id, a base-specifier, or an elaborated-type-specifier is implicitly assumed to name a type, without the use of the typename keyword. In a nested-name-specifier that immediately contains a nested-name-specifier that depends on a template parameter, the identifier or simple-template-id is implicitly assumed to name a type, without the use of the typename keyword. [Note: the typename keyword is not permitted by the syntax of these constructs. —end note]
Date: 2010-08-03.00:00:00
N3092 comment GB 44

It is not clear from the current wording of 13.8 [temp.res] whether the following is well-formed or not:

    template<typename T> struct id { typedef T type; };
    template<typename T> void f() { int id<T>::type::*p = 0; }
    struct A { };
    int main() { f<A>(); }

If typename is required before the use of id<T>::type, it is not permitted by the current syntax.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetstatus: dr -> fdis
2010-11-29 00:00:00adminsetmessages: + msg3203
2010-11-29 00:00:00adminsetstatus: ready -> dr
2010-08-23 00:00:00adminsetmessages: + msg2811
2010-08-03 00:00:00admincreate