This is what I\'m trying to do:
// base case
void f() {}
template
void f() {
Another way is turning the non-template function f into a variadic template function which accepts zero or more template arguments (the other f requires one or more template arguments). Then to avoid ambiguity, SFINAE away this template function when the number of arguments is not zero. Well, a code is better than 1000 words:
#include
template
typename std::enable_if::type f() {
}
template
void f() {
// do something with T
f();
}