title: Variadic function template base case: without parameters or with one?
body: <p>I would like to know which one of these (if any) options would be preferred. </p>
  
  <p>For example I'm implementing a sum function taking arbitrary number of arguments. The main template is then</p>
  
  <pre><code>template &lt;typename T, typename... Ts&gt;
  auto sum(T t, Ts... ts)
  {
      return t + sum(ts...);
  }
  </code></pre>
  
  <p>For the base case I can see at least two options:</p>
  
  <ol>
  <li><p>Base case is sum():</p>
  
  <pre><code>auto sum() 
  { 
      return 0; 
  }
  </code></pre></li>
  <li><p>Base case is sum( T ):</p>
  
  <pre><code>template &lt;typename T&gt;
  auto sum(T t)
  {
      return t;
  }
  </code></pre></li>
  </ol>
  
  <p>Both of those seem to work in the same way in this case, but which one would be generally preferred?</p>