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

             Bug #: 11850
           Summary: empty function parameter pack expansions before the
                    end of the parameter list don't work
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++0x
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


This crashes clang:

template<typename ...T> struct S {
  int f(T...a, int b) { return b; }
};
S<> s;
int k = s.f(0);

... like so:

lib/Sema/SemaTemplateInstantiateDecl.cpp:2549: void
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl *, bool, bool): Assertion `FParamIdx <
Function->getNumParams()' failed.



This is rejected:

template<typename ...T> void f(T...a, int b) {}
template void f<>(int b);

... like so:

<stdin>:2:15: error: explicit instantiation of 'f' does not refer to a function
      template, member function, member class, or static data member
template void f<>(int b);
              ^

I believe both of these cases should work.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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