At compile time

Don nospam at nospam.com
Wed Aug 5 02:33:36 PDT 2009


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.


More information about the Digitalmars-d-learn mailing list