title: Is there any elegant way? (type parameter pack)
body: <p>I want to make a function that accepts types and call itself again by looping or recursion.</p>
  
  <p>What I had already tried was below, but it only called the base function (Called base function with <code>AModule</code> class and didn't call the function with <code>BModule.</code> </p>
  
  <pre class="lang-cpp prettyprint-override"><code>class AModule {
  };
  class BModule {
  };
  
  auto main() -&gt; int {
    init&lt;AModule, BModule&gt;()
    return 0;
  }
  
  template&lt;typename Module&gt;
  void init() {
    // BASE FUNCTION
    // Do something
  }
  
  template&lt;typename... Modules&gt;
  void init() {
    (init&lt;Modules&gt;(), ...)
  }
  
  </code></pre>