A Summation Function For Arbitrary Nested Vector Implementation In C++
The template seems reasonable, although inputArray is a misnomer. However, there is a major drawback that can be remedied with a single &amp;: use call-by-reference instead of call-by-value (see guidelines):
template&lt;class T&gt;
inline long double Sum(const std::vector&lt;T&gt; &amp;inputArray)
{ 
    ...
}

Other than that it's perfectly fine for summing arbitrary nested std::vector&lt;double&gt;.
That being said, there is some room for further experiments:

enable Sum for anything that has begin() and end()
enable Sum for other types than double (e.g. int)

Also, I'm a little bit concerned by the comment that declaration and definition were split. While it's possible, it's usually not intended.