This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[comp.lang.c++.moderated] Incomplete type problem
- To: egcs-bugs at cygnus dot com
- Subject: [comp.lang.c++.moderated] Incomplete type problem
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 18 Oct 1997 01:32:50 -0200
Hi!
I saw this in comp.lang.c++.moderated, and was about to say that the
current snapshot of egcs would compile it if he'd used typename C::B
instead of just C::B, when I decided to try it. It produced an
internal compiler error in line 7 :-(
It seems that lookup_field should not look at D's base class until it
is defined... Does anyone have a simple fix?
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
- Subject: Incomplete type problem
- From: thimm at oberon dot physik dot fu-berlin dot de (Axel Thimm)
- Date: 17 Oct 1997 09:19:20 -0400
- Newsgroups: comp.lang.c++.moderated
- Organization: Freie Universitaet Berlin
Why does the following code produce an incomplete type? I struggled hard
through the CD2 to find the reason, but did not find the spot. Could it
be a
compiler error? If not, what could be done to achieve this desired
functionality?
template<class C>
class A {
public:
C::B x;
};
class D : public A<D> {
public:
typedef double B;
};
Regards,
Axel Thimm.
--
Axel Thimm thimm@physik.fu-berlin.de thimm@ifh.de
[ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
[ about comp.lang.c++.moderated. First time posters: do this! ]