PR c++/52380
* pt.c (coerce_template_parms): Even if we aren't converting we
want to expand argument packs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186479
138bc75d-0d04-0410-961f-
82ee72b054a4
2012-04-15 Jason Merrill <jason@redhat.com>
+ PR c++/52292
+ PR c++/52380
+ * pt.c (coerce_template_parms): Even if we aren't converting we
+ want to expand argument packs.
+
PR c++/52706
* mangle.c (write_type): nullptr_t is a builtin type.
{
/* We don't know how many args we have yet, just
use the unconverted ones for now. */
- new_inner_args = args;
+ new_inner_args = inner_args;
break;
}
}
2012-04-15 Jason Merrill <jason@redhat.com>
+ PR c++/52380
+ * g++.dg/cpp0x/variadic125.C: New.
+
+ PR c++/52292
+ * g++.dg/cpp0x/variadic124.C: New.
+
PR c++/52706
* g++.dg/cpp0x/nullptr27.C: New.
--- /dev/null
+// PR c++/52292
+// { dg-options -std=c++11 }
+
+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
+}
--- /dev/null
+// PR c++/52380
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+struct S
+{
+ template<typename U>
+ struct Unary // Line 5
+ {};
+
+ template<unsigned, typename... Args>
+ struct Dispatch // Line 9
+ : public Unary<Args...>
+ {};
+
+ template<typename... Args>
+ struct Variadic
+ : public Dispatch<sizeof...(Args), Args...>
+ {};
+};
+
+int main()
+{
+ S<void>::Variadic<void> z;
+}