title: Why clang is not able to instantiate nested variadic template with defaulted integer_sequence?
body: <p>Consider an example:</p>
  
  <pre><code>#include &lt;utility&gt;
  
  template &lt;class... Ts&gt;
  struct pack { 
     static constexpr std::size_t size = sizeof...(Ts);
  };
  
  template &lt;class P, class = std::make_index_sequence&lt;P::size&gt;&gt;
  struct ipack;
  
  template &lt;class... Ts, std::size_t... Is&gt;
  struct ipack&lt;pack&lt;Ts...&gt;, std::index_sequence&lt;Is...&gt;&gt; { 
     static constexpr std::size_t size = sizeof...(Ts);
  };
  
  template &lt;class IP, class = std::make_index_sequence&lt;IP::size&gt;&gt;
  struct vpack;
  
  template &lt;class... Ts, std::size_t... Is&gt;
  struct vpack&lt;ipack&lt;pack&lt;Ts...&gt;&gt;, std::index_sequence&lt;Is...&gt;&gt; { 
     static constexpr std::size_t size = sizeof...(Ts);
  };
  
  int main() {
      vpack&lt;ipack&lt;pack&lt;int, int, int&gt;&gt;&gt; vp;
      static_cast&lt;void&gt;(vp);
  }
  </code></pre>
  
  <p>clang <a href="https://wandbox.org/permlink/Rbq4D7W2VKLZR4JI" rel="nofollow noreferrer">reports</a> a problem with:</p>
  
  <pre><code>prog.cc:29:39: error: implicit instantiation of undefined template 'vpack&lt;ipack&lt;pack&lt;int, int, int&gt;, std::__1::integer_sequence&lt;unsigned long, 0, 1, 2&gt; &gt;, std::__1::integer_sequence&lt;unsigned long, 0, 1, 2&gt;
  vpack&lt;ipack&lt;pack&lt;int, int, int&gt;&gt;&gt; vp;
                                    ^
  </code></pre>
  
  <p>gcc <a href="https://wandbox.org/permlink/TvA0lhsbvaPtMe0r" rel="nofollow noreferrer">does not share</a> clangs feelings here. Which compiler is right? Is the code above ill-formed in some way?</p>