digitalmars.D.learn - We can't have alias of instantiated auto ref functions?
- Yuxuan Shui (14/14) Mar 18 2017 auto a(T)(auto ref T t) {
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.
Mar 18 2017