import core.stdc.stdio; extern(C): struct A(int I){ int i; static if(I==4) void f(){ printf("kk"); } } void main() { A!4 t; t.f(); }
d的编译时值参数与static if.
d的编译时值参数
static if