format()

jdrewsen jdrewsen at nospam.com
Sun Jun 12 14:57:57 PDT 2011


Den 12-06-2011 18:37, Lloyd Dupont skrev:
> mm... ok.
> but why the line below doesn't compile?
>
> mixin(format("class %s {}", "A"));

Because the mixin is evaluated at compile time. This means that 
format(...) is evaluated at compile time which afaik is not supported.

It may be supported in the future with the improved CTFE that is being 
worked on.

/Jonas


More information about the Digitalmars-d-learn mailing list