<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 --- - SFINAE failure with variadic non-type template parameter" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23840&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=bY5sS6HqywhONRjbRKnmuXSMVIAlolEGj4QN5fbv2_A&s=MxVMmTwtCMpxNUjqwQdDJ4zGSNQcXcLuVi637dUCd6k&e=">23840</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SFINAE failure with variadic non-type template parameter
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.6
          </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>C++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>avi@cloudius-systems.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The sample code:

====== begin sample =====

template <typename T>
struct x1 {
  using type = int;
};

template <typename T>
struct x2 {
};

template <typename T, typename x1<T>::type...>
void f(T x) {
}

template <typename T, typename x2<T>::type...>
void f(T x) {
}

int main(int ac, char** av) {
  f(1);
}

====== end sample ====

Does not compile, as clang does not reject the second overload of f(T), even
though x2<T>::type does not exist.

g++ compiles this.  This error is particularly bad since it causes
std::experimental::optional<> from libstdc++ 5 not to build.</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>