为什么内部"模板"类不允许在函数内部?

iam*_*ind 7 c++ templates inner-classes

可能重复:
为什么不能在函数中声明模板?

void fun ()
{
  template<typename T> struct InnerClass {};
}
Run Code Online (Sandbox Code Playgroud)

给出错误.

error: expected primary-expression before ‘template’
error: expected ‘;’ before ‘template’
Run Code Online (Sandbox Code Playgroud)

只是想知道,为什么