This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11763] members disappear when inherited from template parameter class


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11763



------- Additional Comments From stefaandr at hotmail dot com  2003-08-04 10:25 -------
Subject: Re:  members disappear when inherited from template
 parameter class

This question is likely a very stupid one, but here goes:
I compiled:

template <class T> class a : public T { public: using T::aa; a() { aa = 5; 
}; };class b { protected: int aa; };
a < b > a1;

with
  GNU C++ version 3.4 20030803 (experimental) (i686-pc-linux-gnu)
    which worked
  GNU C++ version 3.5-tree-ssa 20030731 (merged 20030722) (i686-pc-linux-gnu)
    which gives:
p.cpp: In constructor `a<T>::a()':
p.cpp:1: error: `aa' undeclared (first use this function)
p.cpp:1: error: (Each undeclared identifier is reported only once for each
   function it appears in.)
Am I using the wrong cvs-branch (3.4) to test against?  Or am I doing 
still something else wrong?

Thanks,
Stefaan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]