What is the correct syntax for defining a specialization of a function template?
Here are comments with each syntax: void foo(int param); //not a specialization, it is an overload void foo<int>(int param); //ill-formed //this form always works template <> void foo<int>(int param); //explicit specialization //same as above, but works only if template argument deduction is possible! template <> void foo(int param); //explicit specialization //same as above, but works … Read more