Why function template cannot be partially specialized?
问题 I know the language specification forbids partial specialization of function template. I would like to know the rationale why it forbids it? Are they not useful? template<typename T, typename U> void f() {} //allowed! template<> void f<int, char>() {} //allowed! template<typename T> void f<char, T>() {} //not allowed! template<typename T> void f<T, int>() {} //not allowed! 回答1: AFAIK that's changed in C++0x. I guess it was just an oversight (considering that you can always get the partial