CTFE in imported static initializers

Steven Schveighoffer schveiguy at gmail.com
Tue May 14 08:26:41 UTC 2019


On 5/13/19 9:39 PM, Steven Schveighoffer wrote:

> Does anyone have a good answer for why this should happen, or should I 
> file a bug?


It's been mentioned to me that type inference is used here. However, one 
could argue that the CTFE doesn't need to complete in order to infer the 
type, the function is not a template or auto function.

In addition, if I change the declaration to:

static string moddata = ...;

It still takes 1 second to compile mod1.

-Steve


More information about the Digitalmars-d-learn mailing list