<html>
    <head>
      <base href="http://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 --- - Clang deduces conflicting types when using a "using template"-defined variadic function"
   href="http://llvm.org/bugs/show_bug.cgi?id=19802">19802</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang deduces conflicting types when using a "using template"-defined variadic function
          </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>C++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dontbugme@mailinator.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>Created <span class=""><a href="attachment.cgi?id=12545" name="attach_12545" title="Failing test case">attachment 12545</a> <a href="attachment.cgi?id=12545&action=edit" title="Failing test case">[details]</a></span>
Failing test case

Instantiating a templated variadic function type incorrectly fails, for
example:

=============================================================
template<typename... Output>
using Func = void(Output*...);
=============================================================



Compiling the attached test case with 'clang++ --std=c++11 a.cc' (or indeed
c++1y) results in the following error message:

=============================================================
a.cc:21:3: error: no matching function for call to 'run_func'
  run_func(f, &value);
  ^~~~~~~~
a.cc:9:6: note: candidate template ignored: deduced conflicting types for
      parameter 'Output' ('double' vs. <double>)
void run_func(Func<Output...>& func, Output*... output) {
     ^
=============================================================


Using the function type directly, however, compiles as expected. That is
replacing the signature of run_func with:


=============================================================
template<typename... Output>
void run_func(void (&func)(Output*...), Output*... output) {
=============================================================</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>