'function' : deduced template arguments do not match explicit template arguments
The compiler first looks at the relationship between the types between the <> and how they are used in the function arguments. Then it looks at your specialization to see if the relationship there is the same.
For example, the following code generates C2769:
template<typename T> void f(const T &); template void f<int>(const char &);