///////// test.d //////// void fun(T)(auto ref T t) if (false) { } void fun(T)() { } alias fun!int funint; ///////////////////////// Compiler complains: test.d(1): Error: auto can only be used for template function parameters Not only is this error spurious (the constraint will never pass), but the compiler does not indicate the location of the instantiation.