http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920
Summary: typename specifier should not ignore non-type names
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
The following is ill-formed code
struct A {
struct B { };
int B;
};
typename A::B a;
GCC accepts it. As a perhaps related issue, the following looks well-formed:
template<typename T>
void f(typename T::B) { }
template<typename T>
void f(struct T::B) { }
GCC rejects it as a redefinition. The dependent parameter types of both look
different.