http://llvm.org/bugs/show_bug.cgi?id=14841
Bug #: 14841
Summary: substitution failure with explicitly-specified
template arguments via parameter pack
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
[Found on std-discussion]
template<class T, class U>
struct Foo { };
template<class... Args>
void Bar(Foo<Args...> f)
{
}
template<class... Args>
void Baz()
{
Foo<Args...> f;
}
int main()
{
Foo<int, float> f;
Bar(f); // #1
Bar<int, float>(f); // #2
Baz<int, float>(); // #3
}
Clang says:
<stdin>:19:5: error: no matching function for call to 'Bar'
Bar<int, float>(f); // #2
^~~~~~~~~~~~~~~
<stdin>:5:6: note: candidate template ignored: substitution failure [with Args
= <int, float>]: too many template arguments for class template 'Foo'
void Bar(Foo<Args...> f)
^ ~~~
This code looks valid to me.
--
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