[3.4.2 and 3.4.3] Cannot access protected member from a template derived class

Stephane Ouellette ouellettes@videotron.ca
Wed Dec 8 21:24:00 GMT 2004


Folks,

    I am pretty new at compiling GCC, so I would like to know if anyone 
has ever seen something like this. The attached program compiles cleanly 
under g++ 3.3.2 but fails to compile under g++ 3.4.2 and 3.4.3.

    I created a base class that defines an integer as a protected 
member.  Then, from a template class that derives from the previous base 
class, I can access the protected member in the base class.

    If I derive an nother template class from the previously defined 
one, I cannot access the protected member anymore.

    I would appreciate if someone can confirm the problem or tell me 
what I have done wrong... I hope that all the needed informations can be 
found in the source file.

Regards,

Stephane Ouellette.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++
Size: 1628 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20041208/e2af85d0/attachment.bin>


More information about the Gcc-bugs mailing list