<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 --- - unable to pass types from vairadic-template-function to templated argument(s)"
   href="https://llvm.org/bugs/show_bug.cgi?id=25695">25695</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>unable to pass types from vairadic-template-function to templated argument(s)
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>llvm@adaptivetime.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>if you have a variadic template type (see type "deeper") and pass it as a
template argument to s variadic template function (see function "shallow") then
clang will be unable to use it, even without having to deduce it's type.

=== CODE ===

template<typename... ArgTypes>
using deeper = void(*)(ArgTypes...);

template<typename... ArgTypes>
void shallow(deeper<ArgTypes...> arg) { }

int main(int argc, char* argv[])
{
  deeper<int> arg;
  shallow<int>(arg);
  return 0;
}


=== ERRORS ===

$ clang++ -std=c++14 broken.cpp -o broke
broken.cpp:10:3: error: no matching function for call to 'shallow'
  shallow<int>(arg);
  ^~~~~~~~~~~~
broken.cpp:5:6: note: candidate template ignored: failed template argument
deduction          
void shallow(deeper<ArgTypes...> arg) { }
     ^
1 error generated.</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>