Created on 2002-03-18.00:00:00 last changed 196 months ago
[Voted into WP at April 2003 meeting.]
Proposed resolution (October 2002):
In 13.8 [temp.res] paragraph 4, replace the example with:
struct A { struct X { }; int X; } ; struct B { struct X { }; } ; template<class T> void f(T t) { typename T::X x; } void foo() { A a; B b; f(b); // OK -- T::X refers to B::X. f(a); // error: T::X refers to the data member A::X not // the struct A::X. }
The following example from 13.8 [temp.res] paragraph 4:
struct A { struct X { }; int X; }; template<class T> void f(T t) { typename T::X x; // ill-formed: finds the data member X // not the member type X }
is not ill-formed. The intent of the example is obvious, but some mention should be made that it is only ill-formed when T=A. For other T's, it could be well formed.
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2003-04-25 00:00:00 | admin | set | messages: + msg874 |
2003-04-25 00:00:00 | admin | set | status: ready -> wp |
2002-11-08 00:00:00 | admin | set | messages: + msg730 |
2002-11-08 00:00:00 | admin | set | status: open -> ready |
2002-03-18 00:00:00 | admin | create |