[C++] Overloading a type name with a function
Daniel Jacobowitz
drow@false.org
Sat Aug 7 08:04:00 GMT 1999
I have this testcase, which compiled under egcs 1.1.2:
---------
class A {};
class B { protected: bool A(int a); };
class C : public B { A myA; };
---------
>From what I can tell the definition of 'class A' is completely hidden
in C by 'bool B::A(int)'. Thus a syntax error in the declaration of
myA. Is this right, or should the compiler find the class A
declaration in the top level?
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| SCS Class of 2002 |
| Debian GNU/Linux Developer __ Carnegie Mellon University |
| dan@debian.org | | dmj+@andrew.cmu.edu |
\--------------------------------/ \--------------------------------/
More information about the Gcc
mailing list