title: Parameter pack referenced but not expanded in a using declaration: compiler bugs or not?
body: <p>Consider the following code (also available <a href="https://godbolt.org/z/bPzTbfbzz" rel="nofollow noreferrer">here</a> on compiler explorer)</p>
  <pre><code>#include &lt;utility&gt;
  #include &lt;type_traits&gt;
  
  template &lt;std::size_t N, class = std::make_index_sequence&lt;N&gt;&gt;
  struct type;
  
  template &lt;std::size_t N, std::size_t... I&gt;
  struct type&lt;N, std::index_sequence&lt;I...&gt;&gt;
  : std::integral_constant&lt;std::size_t, I&gt;... {
      using std::integral_constant&lt;std::size_t, I&gt;::operator()...;
  };
  
  using x = type&lt;4&gt;;
  </code></pre>
  <p>For many compilers, it leads to a compiler error:</p>
  <pre><code>// icc 19.0.0: &lt;source&gt;(10): error: parameter pack &quot;I&quot; was referenced but not expanded
  // icc 19.0.1: OK
  // gcc 6.4: &lt;source&gt;:10:60: error: parameter packs not expanded with '...'
  // gcc 7.1: OK
  // clang 3.9.1: &lt;source&gt;:10:11: error: using declaration contains unexpanded parameter pack 'I'
  // clang 4.0.0: OK
  // msvc 19.22: &lt;source&gt;(10): error C3520: 'I': parameter pack must be expanded in this context
  // msvc 19.23: OK
  </code></pre>
  <p>To me, it seems like perfectly valid <code>c++17</code> code but I am surprised that it does not seem to compile on relatively recent compilers (especially for <code>intel</code> and <code>msvc</code>) (even if it compiles on all the most recent versions).</p>
  <p>I am wondering whether:</p>
  <ul>
  <li>it's completely <code>c++17</code> valid code and it just took a long time for some vendors to implement it</li>
  <li>it is not purely <code>c++17</code> valid code</li>
  </ul>