Hi,
Say I have overloaded functions with different arguments AND return types. Each set of argument has only one corresponding return type.
Later I have:Code:Vector grad(Scalar) Tensor grad(Vector)
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 ?Code:template <class T> void test(T x) { ... Y = grad(x) }
Thanks for any help


Reply With Quote
Bookmarks