I accidentally made a mistake coding a template function specialization, and the resulting construct passed compilation with VS17. ( The third construct in the included code below )
Is this a valid construct? How would I call this function?
template <class T> void tempfunc(T t)
{
cout << "Generic Template Version\n";
}
template <>
void tempfunc<int>(int i) {
cout << "Template Specialization Version\n";
}
template <int> void tempfunc(int i)
{
cout << "Coding Mistake Version\n";
}
I have not been able to call the third construct.