Typically usage case is `arg` in auto apply(alias fun, T)(T arg) { return fun(arg); } Another example is parameters of std.format.format(), std.stdio.write(), and std.stdio.writeln().
As far as I can tell (https://run.dlang.io/is/4tusPN), `scope` is in fact inferred for `arg` in the example given. So this is not an issue with templates genrally, but with `format`, `write`, and `writeln` in particular.