[Bug c++/48920] New: typename specifier should not ignore non-type names
schaub.johannes at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Fri May 6 22:54:00 GMT 2011
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: unassigned@gcc.gnu.org
ReportedBy: schaub.johannes@googlemail.com
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.
More information about the Gcc-bugs
mailing list