gcc 3.4 - template problem
Lev Assinovsky
LAssinovsky@algorithm.aelita.com
Thu Apr 29 09:10:00 GMT 2004
Hi All!
The program (tst.cpp) bellow can be compiled only after
removing the comments /*A<T1>::*/:
template <class T> struct A
{
T x;
};
template <class T1> struct B: A<T1>
{
B() { T1 y = /*A<T1>::*/x;}
};
tst.cpp: In constructor `B<T1>::B()':
tst.cpp:8: error: `x' undeclared (first use this function)
With gcc 3.2 everything is fine.
Is it a bug of gcc 3.4 or my fault?
Thanks in advance.
----
Lev Assinovsky
Aelita Software Corporation
(now is a part of Quest Software)
O&S InTrust Framework Division, Team Leader
ICQ# 165072909
More information about the Gcc-help
mailing list