'Auto can only be used for template function arguments' what?

Timon Gehr timon.gehr at gmx.ch
Tue Jun 26 09:37:29 PDT 2012


On 06/26/2012 06:17 PM, Mehrdad wrote:
> void test1(T)(auto ref T) { }
> void test2() { int a = 5; test1!(int)(a); }
>
> Is there any reason this should fail?

There is not. I suppose the compiler completes instantiation without
looking at the function parameter.


More information about the Digitalmars-d mailing list