This is the mail archive of the gcc-help@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]

problem of template inheritance on g++


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

 



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