This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: nested namespace and enum
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: "Pavoori, Kiran" <kiran dot pavoori at polycom dot com>
- Cc: "'gdb at sources dot redhat dot com'" <gdb at sources dot redhat dot com>
- Date: Mon, 14 Jul 2003 23:39:18 -0400
- Subject: Re: nested namespace and enum
- References: <5314B62255397440B12213B31CB2E9F113CD32@corpmail02>
On Mon, Jul 14, 2003 at 10:46:19AM -0700, Pavoori, Kiran wrote:
> Would like to hear an opinion on this declaration.
>
> namespace N
> {
> class C
> {
> public:
> ~C(){}
> C() {}
> typedef enum
> {
> EV_X,
> EV_Y,
> EV_Z
> } Events;
> };
> }
>
>
> Now looking at the above declaration I would access the enum EV_X as
> follows:
>
> N::C::EV_X
>
> Is this an acceptable declaration?
> Please comment when you get a chance, thank-you
> Kiran
This does not work in GDB right now, and will not for at least another
release. It may also require some compiler changes. Your C++ is right
though.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer