2 problems I can't get my head around
Manu
turkeyman at gmail.com
Mon Nov 26 04:31:51 PST 2012
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.
2.
import std.stdio;
pragma(msg, !is(std) && is(typeof(std))); // <- true?!
std.stdio is a module, it looks like a variable. typeof(std) == void...
What the? Why does it even have a type?
I can't find a sensible way to distinguish std from any other regular
variable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121126/43f3936b/attachment.html>
More information about the Digitalmars-d
mailing list