title: How to call a function on all variadic template args?
body: <p>I would like to do</p>
  
  <pre><code>template&lt;typename... ArgTypes&gt; void print(ArgTypes... Args)
  {
     print(Args)...;
  }
  </code></pre>
  
  <p>And have it be equivalent to this quite bulky recursive chain:</p>
  
  <pre><code>template&lt;typename T, typename... ArgTypes&gt; void print(const T&amp; t, ArgTypes... Args)
  {
    print(t);
    print(Args...);
  }
  </code></pre>
  
  <p>followed by explicit single-parameter specializations for every type I'd like to print.</p>
  
  <p>The "problem" with the recursive implementation is that a lot of redundant code is generated, because each recursive step results in a new function of <code>N-1</code> arguments, whereas the code I'd like to have would only generate code for a single <code>N</code>-arg <code>print</code> function, and have at most <code>N</code> specialized <code>print</code> functions.</p>