g++ has trouble with nested classes in a template

jdassen@wi.leidenuniv.nl jdassen@wi.leidenuniv.nl
Sun Jul 5 04:29:00 GMT 1998


On Sat, Jul 04, 1998 at 02:56:48PM -0400, Brian White wrote:
> Package: g++
> Source: egcs (1.0.2-0.7)
> Version: 2.90.27-0.7

The current version in Debian is egcs 1.0.3a-0.6 (gcc version egcs-2.90.29
980515 (egcs-1.0.3 release)). This bug is still reproducable with that
version.

> G++ seems to have trouble accessing sub-classes of template classes.  The
> following code illustrates the problem:

This problem is not reproducable with g++-ss_2.91.45-1 (gcc version
egcs-2.91.45 19980701 (gcc2 ss-980609 experimental)) as available from
project/experimental:
/usr/lib/egcs-ss/bin/g++ -Wall -o /dev/null demonstrate.cc      
demonstrate.cc: In instantiation of `Cache<int,void *>':
demonstrate.cc:24:   instantiated from here
demonstrate.cc:24: warning: all member functions in class `Cache<int,void*>' are private
demonstrate.cc: In function `int main(int, char **)':
demonstrate.cc:24: warning: unused variable `class Cache<int,void *> mycache'

Ray
-- 
PATRIOTISM  A great British writer once said that if he had to choose 
between betraying his country and betraying a friend he hoped he would
have the decency to betray his country.                                      
- The Hipcrime Vocab by Chad C. Mulligan 



More information about the Gcc-bugs mailing list