Use an overloaded function instead of a partial template specializations of a class