请教一下下面这段代码为什么是错误的(问题在于第三个template中的那个n不能出现在power的<>里面,想问为什么)
template
int fun3(){
return p=100;
}
template
struct power{
template
static T fun1(T x){
return power::fun1(x)*x;
}
};
template<>
struct power{
template
static T fun1(T x){
return x;
}
};
template
inline T f2(unsigned n,T v){
return power::fun1(v);
}