Is there any difference between template specialization of function and function with same interface as it, but without template specialization

Suppose I have a template function and it’s specialization.

template<class T>
void myfunction(T whatever)
{
}

template<>
void myfunction(int whatever)
{
    //whatever
}

As far as I know, if I never call myfunction is the my programm, the template will never be instantiated and will go into the binary code only regarded as a template(correct me if I am wrong). My question is, will the specialization of myfunction be instantiated in this case?

If yes, how would it differ from the following definition of myfunction

void myfunction(int whatever)
{
    //This is the version of myfunction with the same interface as the template specialization of myfunction above, 
    //except it is not templated.
}

Source: Windows Questions C++

LEAVE A COMMENT