[Solved] C++ template specialization


So what I was missing was <int, int>. complete code:

template <typename typeA, typename typeB>
typeA foo(const typeB *pt) {
  // do something;
} 

template float foo<float, float>(const float *pt);
template double foo<double, double>(const double *pt);

template<>
int foo<int, int>(const int *pt) {
  // do something different for int;
}

solved C++ template specialization