title: what the difference between sizeof..(typename) and sizeof..(parameter) in variadic template c++
body: <p>Whats the difference between <code>sizeof..(typename)</code> and <code>sizeof..(parameter)</code>  in a variadic template in c++? </p>
  
  <p>In cpp primer 5th, I can't understand the difference:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  template &lt;typename T, typename... Args&gt;
  void foo(const T &amp;t, const Args &amp;... rest)
  {
      std::cout &lt;&lt; "sizeof...(Args)=" &lt;&lt; sizeof...(Args) &lt;&lt; "  sizeof...(rest)=" &lt;&lt; sizeof...(rest) &lt;&lt; std::endl;
  }
  
  int main(int argc, const char **argv)
  {
      int i = 0;
      double d = 3.14;
      string s = "how";
  
      foo(i, s, 42, d); /// sizeof...(Args)=3  sizeof...(rest)=3
      foo(s, 42, "hi"); /// sizeof...(Args)=2  sizeof...(rest)=2
      foo(d, s);        /// sizeof...(Args)=1  sizeof...(rest)=1
      foo("hi");        /// sizeof...(Args)=0  sizeof...(rest)=0
      foo(i, s, s, d);  /// sizeof...(Args)=3  sizeof...(rest)=3
  
      while (1)
          ;
      return 0;
  }
  
  </code></pre>