http://llvm.org/bugs/show_bug.cgi?id=21446

            Bug ID: 21446
           Summary: Trailing decltype in variadic function with explicitly
                    specified template parameters fails
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

This code fails to compile:

    template<typename...Us>
    void boinc(Us...us)
    {}

    template<typename ... Us>
    auto foo(Us...us) -> decltype(boinc(((Us)us)...))
    {
    }

    int main()
    {
        foo<int, int, int>(0,0,0);
    }

The error I get is:

test.cpp:13:5: error: no matching function for call to 'foo'
    foo<int, int, int>(0,0,0);
    ^~~~~~~~~~~~~~~~~~
test.cpp:7:6: note: candidate template ignored: substitution failure
      [with Us = <int, int, int>]: pack expansion contains parameter packs 'Us'
and 'us' that have different lengths (3 vs. 4)
auto foo(Us...us) -> decltype(boinc(((Us)us)...))
     ^                                      ~~~
1 error generated.


This is obviously bogus.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to