title: Multiple expansions of multiple parameter packs in the same expression
body: <p>I want to ask if the following code is valid.</p>
  
  <p>I wonder about the possibility to expand parameter packs multiple times in one expression.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;tuple&gt;
  
  class ExpandWithConstructor
  {
      public:
          template &lt;typename ... T&gt;
          ExpandWithConstructor( T... args) { }
  };
  
  template &lt;typename T&gt;
  int PrintArgs( T arg )
  {
      std::cout &lt;&lt; arg  &lt;&lt; ", ";
      return 0;
  }
  
  template &lt;typename Head, typename ... T&gt;
  class DebugPrinter: public DebugPrinter&lt;T...&gt;
  {
      public:
          DebugPrinter() { }
  
          template&lt; typename ...Y&gt;
          DebugPrinter( Y ... rest ) 
          {   
              std::cout &lt;&lt; "Construction of: " &lt;&lt; __PRETTY_FUNCTION__ &lt;&lt; " Values: " ;
              ExpandWithConstructor{PrintArgs( rest)...};
              std::cout &lt;&lt; std::endl;
          }   
  
  };
  
  template &lt;typename Head&gt;
  class DebugPrinter&lt; Head &gt;
  {   
      public:
  };  
  
  template &lt;typename ... T&gt;
  class TypeContainer: public std::tuple&lt;T...&gt;
  {
      public:
          TypeContainer(T... args):std::tuple&lt;T...&gt;(args...){};
  };
  
  template &lt;typename... T1&gt; class CheckVariadic;
  
  template &lt;typename... T1, typename ...T2&gt;
  class CheckVariadic&lt; TypeContainer&lt;T1...&gt;, TypeContainer&lt;T2...&gt;&gt; :
            public DebugPrinter&lt; T1, T2, T1...&gt;...
  {
      public:
          CheckVariadic( T1... args1, T2... args2, T1... args3): DebugPrinter&lt; T1, T2, T1...&gt;(args1, args2..., args1)... {}
  };
  
  
  int main()
  {
      CheckVariadic&lt; TypeContainer&lt;int,float&gt;, TypeContainer&lt;char, void*&gt;&gt; checkVariadic1{ 1,2.2,'c',(void*)0xddddd,5,6.6,};
  }
  </code></pre>
  
  <p>As you can see the code uses :
      DebugPrinter&lt; T1, T2, T1...>...</p>
  
  <p>if T1 is given with "int,float" and T2 is "char,void*"
  which expands to</p>
  
  <pre><code>DebugPrinter&lt; T1, T2, int, float&gt;...
  </code></pre>
  
  <p>which expands to</p>
  
  <pre><code>DebugPrinter&lt; int, char, int, float&gt;
  DebugPrinter&lt; float, void*, int, float&gt;
  </code></pre>
  
  <p>The same expansion goes with:</p>
  
  <pre><code> DebugPrinter&lt; T1, T2, T1...&gt;(args1, args2..., args1)...
  </code></pre>
  
  <p>The code compiles with clang3.3 but NOT with gcc4.8.1 so I want to ask if the code is valid or not.</p>
  
  <p>Update:
  gcc 7.2 still did not compile the code. </p>