For instance:
template
void fun(const Type1 &v1, const Type2 &v2)
{
largest::type val
This won't be very feasible. How do you tell the difference between unsigned int and int? You can't use sizeof() because they're both the same "size" in the memory. I think you'll have to roll your own template specialization to handle those cases at which point I'd suggest just using an overloaded function.