At compile time
Lars T. Kyllingstad
public at kyllingen.NOSPAMnet
Wed Aug 5 03:24:13 PDT 2009
Don wrote:
> Jarrett Billingsley wrote:
>> I don't think you can call struct methods at compile-time. Kind of
>> lame, I know. Try making norm a free function.
>>
>>> Can the D2 compiler modified/improved to allow this?
>>
>> It sure would be nice.
>
> In fact the D1 compiler should support it too.
> BTW a few of the restrictions on CTFE will be removed in the next release.
This is good news! The restrictions you are referring to, are they any
of the ones documented here:
http://www.digitalmars.com/d/2.0/function.html#interpretation
or are they "undocumented" restrictions, i.e. bugs?
-Lars
More information about the Digitalmars-d-learn
mailing list