19980824, but in template member scope
Reid M. Pinchback
reidmp@MIT.EDU
Wed Sep 9 07:50:00 GMT 1998
I spotted this in 19980824 on a Dec Alpha OSF/4.0d. The following
code fragment:
namespace foo {
template struct A {};
struct B {
template struct A {};
};
}
causes egcs to complain:
redefinition of 'struct ::foo::A'
Now, in [temp] para 5 we have:
"The name of a class template shall not be declared to refer
to any other template, ..., in the same scope (3.3)"
but template A is in namespace scope while the member
template B::A is in class scope, hence I believe egcs
should accept this as a valid C++ program.
More information about the Gcc-bugs
mailing list