Suppose I've got a template, and I want to only instantiate to a specific list of types, and nothing else, like this:

template<typename T> T addone(T x) {
return x+1;
}

The problem I have is that I only want functions of actual numbers to be created. I don't want it going crazy and trying to do pointer arithmetic and every other **** thing that has a + operator. I only want:

int addone(int x)
unsigned int addone(unsigned int x)
long addone(long x)
unsigned long addone(unsigned long x)
// etc, for short, char, ...

I don't want:
T* addone(T* stupidpointer)

Is there a way to do specialization such that nothing except specialized templates can be instantiated implicitly? This is causing me headaches in combination with overload resolution because it keeps trying to instantiate my templates to stupid things to resolve the overload.