This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52292] New: [C++11] Variadic template expansion into fixed template causes constructor to not match
- From: "leckey.ryan at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 17 Feb 2012 00:59:26 +0000
- Subject: [Bug c++/52292] New: [C++11] Variadic template expansion into fixed template causes constructor to not match
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52292
Bug #: 52292
Summary: [C++11] Variadic template expansion into fixed
template causes constructor to not match
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: leckey.ryan@gmail.com
The following should compile but fails with several errors about declaration
errors.
template <template <typename...> class T>
struct foo {
template <typename... U>
foo(T<U...> x) { }
};
template <typename T>
struct bar {
bar(T x) : value(x) { }
T value;
};
struct generic : private foo<bar> {
template <typename T>
generic(bar<T> x) : foo(x)
{
}
};
int main()
{
bar<int> x(32);
generic y(x); // FAILS
}
If you remove the '...' then everything works.