This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51641] New: Lookup finds enclosing class member instead of template parameter
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 20 Dec 2011 17:05:51 +0000
- Subject: [Bug c++/51641] New: Lookup finds enclosing class member instead of template parameter
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51641
Bug #: 51641
Summary: Lookup finds enclosing class member instead of
template parameter
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jason@gcc.gnu.org
CC: dodji@gcc.gnu.org
Depends on: 36019, 45625
Another case of the lookup problem you fixed previously has come up on the core
mailing list:
struct A {
struct B { typedef int X; };
};
template<class B> struct C : A {
B::X q; // Ok: A::B.
struct U { typedef int X; };
template<class U>
struct D;
};
template<class B>
template<class U>
struct C<B>::D {
typename U::X r; // { dg-error "" }
C<int>::D<double> y;
The use of U in D should find the template parameter, leading to an error on
instantiation.