This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: C++ question - forward declaration for enum?
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: Eljay Love-Jensen <eljay at adobe dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 04 Oct 2003 23:23:35 +0200
- Subject: Re: C++ question - forward declaration for enum?
- References: <"<4E85E49D1F0CBF4F96EA08E335750D7D0718C04C"@Esealnt877.al.sw.ericsson.se><5.2.1.1.0.20031004155038.018ddc58@iplan-mn.corp.adobe.com>
Eljay Love-Jensen <eljay@adobe.com> writes:
> class X
> {
> int m;
> public:
> X(type i) : m(i) { }
> enum type { one, two, three };
> };
>
> Is there a forward declaration? Any proper C++ way to use the enum
> "type" before the full declaration of enum "type"?
No. Can't you just move the enum declaration before the declaration of
the constructor?
--
Falk