<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 - Can't take a pointer to a variadic templated function when the variadic args are not the last argument"
   href="https://bugs.llvm.org/show_bug.cgi?id=38136">38136</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Can't take a pointer to a variadic templated function when the variadic args are not the last argument
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>tmathmeyer@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Won't compile on clang++ (works in gcc, msvcc, icc)

template<typename... CA>
void foo(CA... y, int x) {
  x++;
}

int main(int argc, char **argv) {
  void(*bar)(float, int) = &(foo<float>);
  bar(1.4f, 1);
}

Will compile on all compilers:
template<typename... CA>
void foo(int x, CA... y) {
  x++;
}

int main(int argc, char **argv) {
  void(*bar)(int, float) = &(foo<float>);
  bar(1, 1.4f);
}


The only difference here being the order of arguments in foo(). I also tested
this against all the versions of clang++ on <a href="https://godbolt.org/">https://godbolt.org/</a> and found it
was broken on all versions up to trunk.</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>