Hi,
Say I have overloaded functions with different arguments AND return types. Each set of argument has only one corresponding return type.
Code:
Vector grad(Scalar)
Tensor grad(Vector)
Later I have:
Code:
template <class T>
void test(T x) {
    ...  Y = grad(x) 
}
Then how do I automatically declare the type of Y. Do I need to make the grad function a template and specialize each of them ?
Thanks for any help