title: C++ Variadic template - Unable to figure out the compilation error
body: <p>Given below is the code(CPP part of it) that I am trying to compile</p>
  <pre><code>template&lt;typename... T&gt;
  void SelectOperation::fetchNextRow(tuple&lt;T...&gt;&amp; row) const
  {
      fetchColumn&lt;0, decltype(row), T...&gt;(row, nullptr);
  }
  
  template&lt;int index, typename T, typename U&gt;
  void SelectOperation::fetchColumn(T&amp; row) const
  {
      cout &lt;&lt; typeid(row).name();
      std::get&lt;index&gt;(row) = this-&gt;get&lt;U&gt;(index + 1);
  }
  
  template&lt;int index, typename T, typename U, typename... V&gt;
  void SelectOperation::fetchColumn(T&amp; row, void*) const
  {
      fetchColumn&lt;index, T, U&gt;(row);
      fetchColumn&lt;index + 1, T, V...&gt;(row, nullptr); //Error at this statement
  }
  </code></pre>
  <p>The errors I am getting are as follows:</p>
  <pre><code>D:\workspaces\Calzone_Mayank\modules\Figgy\include\common/db/core/SelectOperation.h(149): 
  error C2783: 'void figgy::SelectOperation::fetchColumn(T &amp;,void *) const': could not deduce
  template argument for 'U'
  D:\workspaces\Calzone_Mayank\modules\Figgy\include\common/db/core/SelectOperation.h(58):
  note: see declaration of 'figgy::SelectOperation::fetchColumn'
  D:\workspaces\Calzone_Mayank\modules\Figgy\include\common/db/core/SelectOperation.h(149):
  error C2780: 'void figgy::SelectOperation::fetchColumn(T &amp;) const': expects 1 arguments
  - 2 provided
  </code></pre>
  <p>I am unable to understand why <code>argument for 'U'</code> couldn't be deduced. Why is the compiler unable to determine which overloaded function it should look for?</p>
  <h3>Edit</h3>
  <p>The fetchNextRow is called as shown below:</p>
  <pre><code>template&lt;typename... T&gt;
  void SelectOperation::fetchAllRows(vector&lt;tuple&lt;T...&gt;&gt;&amp; rows) const
  {
      while (next())
      {
          tuple&lt;T...&gt; row;
          fetchNextRow&lt;T...&gt;(row);
          rows.push_back(row);
      }
  }
  </code></pre>
  <p><strong>AND</strong></p>
  <pre><code>vector&lt;tuple&lt;string, string, int&gt;&gt; rows;
  SelectOperation o(&quot;users&quot;, {&quot;name&quot;, &quot;employee_id&quot;, &quot;age&quot;});
  o.fetchAllRows&lt;string, string, int&gt;(rows);
  </code></pre>