problem of template inheritance on g++

Wed May 10 07:51:00 GMT 2006

Following is the code which works on windows but can't work with g++ 

template < class  my_type>

class mytypedef
            public :
                        typedef my_type  new_type;


template <class my_type>

class sample: public mytypedef < my_type >


            public :

                        new_type var;



Error : new_type doest not name a type.


Why is it happening?

What is solution for this problem?


Amol Gajewar


More information about the Gcc-help mailing list