gcc 3.4 - template problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux