Excluding symbols

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 20 14:24:34 PDT 2015


On Mon, 20 Apr 2015 21:00:34 +0000, extrawurst wrote:

> On Monday, 20 April 2015 at 20:36:06 UTC, ketmar wrote:
>> On Mon, 20 Apr 2015 20:31:36 +0000, extrawurst wrote:
>>
>>> static if(__ctfe){}
>>
>> small fix: simply `if (__ctfe)`, `static if (__ctfe)` is error.
>> ;-)
> 
> __ctfe is not readable at compile time ? thats unfortunate..

it will have no sense. DMD is able to eliminate dead code in this case, 
so `if (__ctfe)` will generate plain function. and there is no sense in 
do `static if` for functions, as functions is not instantiating, i.e. 
that will be processed only once, and you will be unable to use function 
both in CTFE and in run time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150420/76ac0dbd/attachment.sig>


More information about the Digitalmars-d mailing list