<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Parameter default values of forward-declared template classes with template parameter packs don't PCH roundtrip"
   href="https://llvm.org/bugs/show_bug.cgi?id=25271">25271</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Parameter default values of forward-declared template classes with template parameter packs don't PCH roundtrip
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jix@jixco.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15131" name="attach_15131" title="tar of cpp file, header file and shell script to reproduce the bug">attachment 15131</a> <a href="attachment.cgi?id=15131&action=edit" title="tar of cpp file, header file and shell script to reproduce the bug">[details]</a></span>
tar of cpp file, header file and shell script to reproduce the bug

When having a forward declaration like this

    template<unsigned T=123, unsigned... U> class dummy;

in a header file that also contains the class definition, using dummy<> fails
with

    error: too few template arguments for class template 'dummy'

when using a precompiled header, even though it works fine otherwise (as it
should).

The bug applies to integer template parameters (as in the given example) as
well as to typename parameters.
The bug doesn't apply to class templates without forward declaration.
The bug also doesn't apply to class templates without a following parameter
pack.

A real world example that triggers this is using gsl::array_view<int> from:

<a href="https://github.com/Microsoft/GSL/blob/master/include/array_view.h">https://github.com/Microsoft/GSL/blob/master/include/array_view.h</a>

I tested with 3.7.0 and svn trunk, which both are affected.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>