title: Variadic expander without a typedef
body: <p>One trick often used to perform a variadic parameter expansion is using an un-sized array typedef in combination with the comma operator, like below:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  template&lt;typename... Ts&gt;
  void expander(Ts&amp;&amp;... ts)
  {
      using expand = int[];
      (void)expand{0, (std::forward&lt;Ts&gt;(ts)(), 0)...};
  }
  void f()
  {
      std::cout &lt;&lt; __PRETTY_FUNCTION__ &lt;&lt; std::endl;
  }
  int main()
  {
      expander(f, f);
  }
  </code></pre>
  
  <p><a href="http://coliru.stacked-crooked.com/a/a4131fd862e185ef" rel="noreferrer"><kbd>Live on Coliru</kbd></a></p>
  
  <p><strong>Can we do this without introducing a typedef?</strong> If I try directly</p>
  
  <pre><code>(void)int[]{0, (std::forward&lt;Ts&gt;(ts)(), 0)...};
  </code></pre>
  
  <p>gcc/clang spit out</p>
  
  <blockquote>
    <p>error: expected primary-expression before 'int'</p>
  </blockquote>
  
  <p>and if I try to parenthesize, the code compiles but I believe it is non-standard compliant:</p>
  
  <blockquote>
    <p>warning: ISO C++ forbids compound-literals [-Wpedantic]</p>
  </blockquote>