What's wrong with this class temlate's typedef?

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

 



Hi,

The following code snippet is a stripped down version of what I use in my code.
Last time I compiled this code is several years ago......I tried to compile it again
today with GCC 4.3.0 (20080428), but now I get an error message:

--------------------------------------------------------
template <typename T = double, unsigned int d = 3> class A { };

template <typename T = double> class B : public A<T, 4> {
    typedef A<T, 3> A;
};

int main () { B<double> *object; };
--------------------------------------------------------


Error message:
   4: error: declaration of ‘typedef class A<T, 3u> B<T>::A’
   1: error: changes meaning of ‘A’ from ‘class A<T, 3u>’

Here, I could use class "A" as a substitute for "A<T,3>" only within the class B.
That used to work in the past. Is there a way to get this compiled again without
having to change all the class names in the typedef?

Thank you.

Rob.





[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