Bug: typename in base specifier
Todd Veldhuizen
tveldhui@seurat.uwaterloo.ca
Mon Sep 8 14:12:00 GMT 1997
This is a bug report against the 970907 snapshot regarding
the use of ``typename'' in base specifiers.
This example fails to compile:
template<class T>
struct A {
typedef T T1;
};
template<class T>
struct B : T::T1 { // insert `typename' before T::T1
};
struct C { };
B<A<C> > z;
If `typename' is inserted before T::T1, then it does compile.
The draft standard says [temp.res, paragraph 4]:
4 The keyword typename is not permitted in a base-specifier or in a mem-
initializer. In these contexts a qualified-name that depends on a
template-parameter (_temp.dep_) is implicitly assumed to be a type
name.
More information about the Gcc-bugs
mailing list