www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - We can't have alias of instantiated auto ref functions?

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

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.
Mar 18 2017