spurious declaration conflict?
Neal Becker
neal@ctd.comsat.com
Tue May 26 07:43:00 GMT 1998
Here is a very simple example. I would think that the complaint given
by egcs-1.0.3 is spurious. I have not checked the standard, but I
would think that logically this should be accepted.
The 3rd statement is rejected by g++. But Complex *is* a class. It
just happens to be typedefd. This stems from the principle (which I
just made up) that the user of a typedefd class shouldn't have to know
that it is a typedef, and not really a class.
--------------
template<class T> class complex {};
typedef complex<double> Complex;
class Complex;
---------------
More information about the Gcc-bugs
mailing list