[LLVMbugs] [Bug 12077] New: Assertion while trying to parse variadic template code.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Feb 24 14:50:44 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=12077
Bug #: 12077
Summary: Assertion while trying to parse variadic template
code.
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: sbenza at google.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
template <typename... Types>
struct TypeTuple {};
template <typename Func, typename Types>
struct FooImpl {};
template <typename Func, typename TypeN, typename... Types>
struct FooImpl<Func, TypeTuple<TypeN, Types...> > {
FooImpl(Func func, const Types&... values, const TypeN& value)
: value_(value) {}
TypeN value_;
};
template <typename Func, typename... Types>
void MakeFoo(Func func, const Types&... values) {
FooImpl<Func, TypeTuple<Types...> > foo(func, values...);
}
void Foo1(int) {}
int main(int argc, char** argv) {
MakeFoo(Foo1, 1);
return 0;
}
============================================
Assertion:
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:2469: void
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool): Assertion `FParamIdx <
Function->getNumParams()' failed.
--
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.
More information about the llvm-bugs
mailing list