Created on 2003-04-18.00:00:00 last changed 33 months ago
[Voted into WP at October 2004 meeting.]
[Voted into WP at October 2004 meeting.]
Paragraph 6 of 13.8 [temp.res] is obsolete as result of issue 224, and needs to be revised.
Within the definition of a class template or within the definition of a member of a class template, the keyword typename is not required when referring to the unqualified name of a previously declared member of the class template that declares a type. The keyword typename shall always be specified when the member is referred to using a qual- ified name, even if the qualifier is simply the class template name. [Example:template<class T> struct A { typedef int B; A::B b; // ill-formed: typename required before A::B void f(A<T>::B); // ill-formed: typename required before A<T>::B typename A::B g(); // OK };]
Proposed Resolution:
Change 13.8 [temp.res] paragraph 6 as follows
Within the definition of a class template or within the definition of a member of a class template, the keyword typename is not required when referring to the unqualified name of a previously declared member of the class template that declares a type.The keyword typename shall always be specified when the member is referred to using a qualified name, even if the qualifier is simply the class template name.[Example:template<class T> struct A { typedef int B; B b; // ok, no typename requiredA::B b; // ill-formed: typename required before A::B void f(A<T>::B); // ill-formed: typename required before A<T>::B typename A::B g(); // OK};The keyword typename is required whether the qualified name is A or A<T> because A or A<T> are synonyms within a class template with the parameter list <T>.]
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-02-18 07:47:23 | admin | set | messages: + msg6687 |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2005-05-01 00:00:00 | admin | set | status: dr -> wp |
2004-11-07 00:00:00 | admin | set | messages: + msg1100 |
2004-11-07 00:00:00 | admin | set | status: ready -> dr |
2004-04-09 00:00:00 | admin | set | status: review -> ready |
2003-11-15 00:00:00 | admin | set | status: open -> review |
2003-04-18 00:00:00 | admin | create |