This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[C++] Overloading a type name with a function
- To: gcc at gcc dot gnu dot org
- Subject: [C++] Overloading a type name with a function
- From: Daniel Jacobowitz <drow at false dot org>
- Date: Sat, 7 Aug 1999 11:07:22 -0400
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 |
\--------------------------------/ \--------------------------------/