Is there a way to tell what type of VAR comes in through a template function?

like this for example
PHP Code:
template <typename T>
void Combine(&a&b)  
{
  if 
int or long
    a 
b;
  if 
string
    a 
+= b;
  if 
char
   strcpy
(a,b);
  
etc..

I though I saw somewhere how to do this, but I can't find it.

Thanks