<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 --- - Error: too few template arguments for class template (GSL/PCH)"
   href="https://llvm.org/bugs/show_bug.cgi?id=26281">26281</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Error: too few template arguments for class template (GSL/PCH)
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>peetlugen19@yandex.com
          </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>I am getting this error on the GSL (Guidelines Support Library) when producing
pch of the file span.h and then including it into any file.

I reduced the file into this example:

foo.h
----
namespace global {
  class U {};

  template <typename T, typename S = U, int... P>
  class MyClass;

  template <typename T, typename S, int... P>
  class MyClass {
  };
}

bar.h
----
namespace global {
  class W {};

  template <typename T = MyClass<W>>
  class InstClass {};
}

clang -cc1 -std=c++14 -x c++-header foo.h -emit-pch -o foo.h.pch
clang -cc1 -std=c++14 -x c++-header -fsyntax-only -include-pch foo.h.pch bar.h

This bug might be related to this bug (Wasn't sure because this is triggered by
using precompiled headers):
<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - too few template arguments for class template 'set'"
   href="show_bug.cgi?id=10147">https://llvm.org/bugs/show_bug.cgi?id=10147</a></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>