2 problems I can't get my head around

Manu turkeyman at gmail.com
Mon Nov 26 04:46:02 PST 2012


On 26 November 2012 14:39, Andrej Mitrovic <andrej.mitrovich at gmail.com>wrote:

> On 11/26/12, Manu <turkeyman at gmail.com> wrote:
> > 1.
> >
> > enum i = 10;
> > pragma(msg, is(i == enum) || is(typeof(i) == enum)); // <- false?!
> >
> > I can't find a way to identify that i is an enum, not a variable; can not
> > be assigned, has no address, etc.
>
> It's not an enum, it's a manifest constant.
>

Well that's certainly not intuitive. I've never even heard that term
before. It looks awfully like an enum, with the whole 'enum' keyword and
all ;)
How do I detect that then?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121126/57e0a6d8/attachment.html>


More information about the Digitalmars-d mailing list