problem of template inheritance on g++

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux