Take the following minimal example:
using Type1 = std::function;
template
using Type2 = std::function;
Several answers already explain the rationale. To add to those answers, the specification says (C++11 §8.3.5[dcl.func]/4):
A parameter list consisting of a single unnamed parameter of non-dependent type
void
is equivalent to an empty parameter list. Except for this special case, a parameter shall not have type cvvoid
.
In your Type2
example, the T
in void(T)
is a dependent type--it depends on a template parameter.