Topic: Forward declaration of classes
Author: arthur@solomon.technet.sg (Arthur Sombrito)
Date: Wed, 7 Oct 1992 03:15:00 GMT Raw View
Manapragada Srinivas (srinivas@lgc.com) wrote:
: Is the following forward declaration valid?
:
: class foo : public bar;
:
: Where I am trying to declare that foo is a class which is publicly derived from
: bar. It works like a charm in g++ 2.2.2, whereas SUN CC2.1 results in a syntax
: error. Which behaviour conforms to the standard? The ARM is silent on this
: issue. When I followed the grammar in the appendix the above type of syntax did
: not seem to be valid.
:
: I would apreciate it very much if someone could shed some light on the above.
:
: Thanks,
: Srinivas
: --
: Yonder, beyond the event horizon!
--
I would say that is an invalid syntax since it is not in the grammar.
Author: checker@acf5.NYU.EDU (checker)
Date: 2 Oct 92 04:16:26 GMT Raw View
srinivas@lgc.com (Manapragada Srinivas) writes:
>Is the following forward declaration valid?
> class foo : public bar;
No. I think the standards committee is looking into different ways of
`forward declaring' more information. Nested types also present similar
problems.
Chris