title: C++ Getting a number of elements in variadic template
body: <p>So I'm trying to get a number of elements in my variadic template like so:</p>
  <pre><code>Test(const T&amp; t...);
  
  template&lt;typename T&gt;
  inline Class&lt;T&gt;::Test(const T&amp; t...){
       int num = sizeof...(t);
       ...
  }
  </code></pre>
  <p>However it doesn't compile and I get the following errors:</p>
  <blockquote>
  <p>error C3523: 'sizeof...' requires as its argument an unexpanded parameter pack</p>
  <p>'t' is not a valid operand for 'sizeof...'. Did you mean to use
  'sizeof'?</p>
  </blockquote>
  <p>What is the correct way to get the number of arguments in <code>t...</code>?</p>