2 problems I can't get my head around

Manu turkeyman at gmail.com
Mon Nov 26 06:06:20 PST 2012


On 26 November 2012 15:56, jerro <a at a.com> wrote:

> That's sooo brutal! But it works, I'll use the first one, the second
>> depends on i being an int.
>>
>
> You can also check if it is known at compile time like this:
>
> template knownAtCompileTime(alias a)
> {
>     enum knownAtCompileTime = is(typeof({ enum e = a; }));
> }
>

That doesn't work, immutable breaks that test.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121126/c63c8e3c/attachment.html>


More information about the Digitalmars-d mailing list