For instance:
template void fun(const Type1 &v1, const Type2 &v2) { largest::type val
template struct is_cond { typedef T1 type; }; template struct is_cond { typedef T2 type; }; template struct largest { typedef typename is_cond< (sizeof(T1)>sizeof(T2)), T1, T2>::type type; };