[llvm-bugs] [Bug 30575] New: Argument deduction of template fails with variadic arguments in the middle

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 30 00:56:46 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30575

            Bug ID: 30575
           Summary: Argument deduction of template fails with variadic
                    arguments in the middle
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jvapen at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17382
  --> https://llvm.org/bugs/attachment.cgi?id=17382&action=edit
Full reproduction

On trying to compile an MSVC codebase with Clang-cl, we noticed that we are
making use of a construct which MSVC supports though ain't working with
clang-cl.

I'm not certain if this is valid c++ according to the standard, though, we are
using this construct several times, so working around it will be a pain.

The issue is that with following template:
template <typename TE, typename ... TA, typename Func>
D *func(C c, B b, typename AExpand<TA>::Type... a, Func f) { return nullptr; }

The argument Func doesn't get deduced correctly if called, while MSVC does
recognize this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160930/fba50a07/attachment.html>


More information about the llvm-bugs mailing list