This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcc 3.4 - template problem
- From: "Lev Assinovsky" <LAssinovsky at algorithm dot aelita dot com>
- To: "Gcc-Help (E-mail)" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 29 Apr 2004 13:08:45 +0400
- Subject: gcc 3.4 - template problem
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