<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Clang compiler failed with error: no matching member function for call to 'f'"
   href="https://bugs.llvm.org/show_bug.cgi?id=39180">39180</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang compiler failed with error: no matching member function for call to 'f'
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>soumi.manna@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Clang compiler failed on windows with error: no matching member function for
call to 'f' for the following example.

bug.cpp:10:19: error: no matching member function for call to 'f'
        int b = a.f();
                ~~^
bug.cpp:2:34: note: candidate template ignored: deduced too few arguments for
expanded pack 'T'; no argument for 1st
      expanded parameter in deduced argument pack <>
        template<Types ...T> int f() {
                                 ^
1 error generated.

Microsoft visual studio 2017 passes the example.

ksh-3.2$ cl -c -std:c++17 bug.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.13.26131.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

bug.cpp

ksh-3.2$ cat bug.cpp
template<class ...Types> struct Tuple_ {  // _VARIADIC_TEMPLATE
        template<Types ...T> int f() {
                return sizeof...(Types);
        }
};

int main(int argc, char *argv[])
{
        Tuple_<char,int> a;
        int b = a.f();
}

Soumi Manna
Intel C/C++ Front-end team</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>