title: Aliasing a template parameter pack
body: <p><strong>Pre-Dramatic</strong></p>
  
  <p>Hi, 
  maybe this question is a duplicate, but I am relative new to template programming  and actually I am not able to find a <strong>simple</strong> and <strong>short solution</strong> (-> only finding megabytes of "<em>roxxor-template-magic</em>" which I don't understand) matching my concrete and simple problem and so I feel a little bit lost now. </p>
  
  <p><strong>Pre-Information</strong></p>
  
  <p>I want to use a "type_container" as template parameter for a class. The container is a simple struct, which should also contain some <strong>typedefs for template parameter packs</strong>. </p>
  
  <p><strong>Question: (related to the example at the bottom)</strong></p>
  
  <p>How can I define and alias the type-lists in the container-struct and how can I access and forward them to the needed entities in the factory-class?
  (<em>No boost and only C++11/14/17</em>)</p>
  
  <p><strong>Example: (Would compile, If I would know a solution)</strong></p>
  
  <pre><code>#include &lt;map&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  #include &lt;stack&gt;
  
  struct MY_TYPE_CONTAINER
  {
      using TYPE_MAP            = std::map&lt;int, int&gt;;
      using TYPE_VECTOR         = std::vector&lt;double&gt;;
      using PARAMETER_PACK1 = //? -&gt; ...T -&gt; int, std::stack&lt;int&gt;, int
      using PARAMETER_PACK2 = //? -&gt; ...T -&gt; double, int, std::string
  };
  
  template &lt;typename TYPES&gt;
  struct Factory
  {
      typename TYPES::TYPE_MAP                       m_map;
      typename TYPES::TYPE_VECTOR                    m_vector;
      typename std::tuple&lt;TYPES::PARAMETER_PACK1...&gt; m_tuple;
      typename std::tuple&lt;std::shared_ptr&lt;TYPES::PARAMETER_PACK1&gt;...&gt; m_tuple2;
      void handlePack2(TYPES::PARAMETER_PACK2... args) { }
  };
  
  
  int main()
  {
      Factory&lt;MY_TYPE_CONTAINER&gt; oStaticFactory;
      oStaticFactory.handlePack2(2.0, 1, "hi");
      return 0;
  }
  </code></pre>
  
  <p><strong>Current (best?) elaborated solution (compilable) (Based on John Zwinck's answer)</strong></p>
  
  <pre><code>#include &lt;map&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  #include &lt;stack&gt;
  #include &lt;memory&gt;
  
  struct MY_TYPE_CONTAINER
  {
      using TYPE_MAP                    = std::map&lt;int, int&gt;;
      using TYPE_VECTOR                 = std::vector&lt;double&gt;;
      using PARAMETER_PACK1             = std::tuple&lt;int, std::stack&lt;int&gt;, int&gt;;
      using PARAMETER_SHARED_PTR_PACK_1 = std::tuple&lt;std::shared_ptr&lt;int&gt;, std::shared_ptr&lt;std::stack&lt;int&gt;&gt;, std::shared_ptr&lt;int&gt;&gt;;
      using PARAMETER_PACK2             = std::tuple&lt;double, int, std::string&gt;;
  };
  
  template &lt;typename TYPES&gt;
  class Factory
  {
      typename TYPES::TYPE_MAP                    m_map;
      typename TYPES::TYPE_VECTOR                 m_vector;
      typename TYPES::PARAMETER_PACK1             m_tuple;
      typename TYPES::PARAMETER_SHARED_PTR_PACK_1 m_tuple2;
  
      void handlePack2Impl(typename TYPES::PARAMETER_PACK2 tup) {};
  
  public:
      template &lt;typename... Args&gt;
      void handlePack2(Args... args) { handlePack2Impl(std::make_tuple(args...)); }
  };
  
  int main()
  {
      Factory&lt;MY_TYPE_CONTAINER&gt; oStaticFactory;
      oStaticFactory.handlePack2(2.0, 1, "hi");
      return 0;
  }
  </code></pre>