原文
import std; template test(alias f) { auto test(I)(I i) { return f(i); } } void main() { alias t = test!(x=>x+1); 1.t.writeln; //<--不编译. 1.test!(x=>x+1).writeln; t(1).writeln; }
局部符号不能用作UFCS函数.
局部符号
UFCS