There is a general workaround in which the function-template just delegates the job to class template member functions:
#include <vector>
#include <iostream>
template <typename T> struct helper {
static void print(T value) { std::cout << value; }
};
template <typename T> struct helper<std::vector<T>> {
static void print(std::vector<T> const &value) { }
};
template <typename T>
void print (T const &value) {
// Just delegate.
helper<T>::print (value);
}
int main () {
print (5);
std::vector<int> v;
print (v);
}
However, if you can come by with simple function overloading (as suggested by ecatmur and Vaughn Cato), do so.