With C++11, there is a way to do this. I don't have enough information from your example to provide an exact solution, but here is an example similar to your situation:
1 2 3 4 5
template<typename T, typename S>
auto Add(T a, S b) -> decltype(a + b) //say that the return type is whatever
{ //is returned by the expression (a + b)
return a + b;
}