At compile time
Don
nospam at nospam.com
Fri Aug 21 04:15:03 PDT 2009
Lars T. Kyllingstad wrote:
> 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
Both. Using CTFE will be a completely different experience after the
next release.
More information about the Digitalmars-d-learn
mailing list