auto a(T)(auto ref T t) {
        return t;
}
void main() {
        alias tmp = a!int;
        import std.stdio;
        writeln(tmp(10));
}

This gives this error message:
test.d(1): Error: 'auto' can only be used as part of 'auto ref' for template function parameters

Which is rather useless, and I have to dig into the code to find out why: the only way to instantiate a auto ref function is to call it. I think this is rather inconvenient.

Reply via email to