Created on 2006-06-21.00:00:00 last changed 178 months ago
[Voted into the WP at the March, 2009 meeting.]
Proposed resolution (October, 2006):
Change 13.8.3 [temp.dep] paragraph 3 as follows:
In the definition of a class or class templateor a member of a class template, if a base classof the class templatedepends on a template-parameter, the base class scope is not examined during unqualified name lookup either at the point of definition of the class template or member or during an instantiation of the class template or member.
13.8.3 [temp.dep] paragraph 3 reads,
In the definition of a class template or a member of a class template, if a base class of the class template depends on a template-parameter, the base class scope is not examined during unqualified name lookup either at the point of definition of the class template or member or during an instantiation of the class template or member.
This wording applies only to definitions of class templates and members of class templates. That would make the following program ill-formed (but it probably should be well-formed):
struct B{ void f(int); }; template<class T> struct D: B { }; template<class T> void g() { struct B{ void f(); }; struct A: D<T> { B m; }; A a; a.m.f(); // Presumably, we want ::g()::B::f(), not ::B::f(int) } int main () { g<int>(); return 0; }
I suspect the wording should be something like
In the definition of a class template or a class defined (directly or indirectly) within the scope of a class template or function template, if a base class...
That should also include deeply nested classes in templates, local classes of non-template member functions of member classes of class templates, etc.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-03-29 00:00:00 | admin | set | status: wp -> cd2 |
2009-08-03 00:00:00 | admin | set | status: dr -> wp |
2009-03-23 00:00:00 | admin | set | messages: + msg2030 |
2009-03-23 00:00:00 | admin | set | status: ready -> dr |
2008-10-05 00:00:00 | admin | set | status: review -> ready |
2006-11-05 00:00:00 | admin | set | messages: + msg1408 |
2006-11-05 00:00:00 | admin | set | status: open -> review |
2006-06-21 00:00:00 | admin | create |