2012-04-15 Jason Merrill <jason@redhat.com>
+ PR c++/47220
+ * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
+
PR c++/52292
PR c++/52380
* pt.c (coerce_template_parms): Even if we aren't converting we
TREE_VEC_ELT (packed_types, arg_idx - parm_idx);
}
- if (arg != error_mark_node)
+ if (arg == error_mark_node)
+ {
+ if (complain & tf_error)
+ error ("template argument %d is invalid", arg_idx + 1);
+ }
+ else
arg = convert_template_argument (actual_parm,
arg, new_args, complain, parm_idx,
in_decl);
2012-04-15 Jason Merrill <jason@redhat.com>
+ PR c++/47220
+ * g++.dg/cpp0x/variadic126.C: New.
+
PR c++/52380
* g++.dg/cpp0x/variadic125.C: New.
// Origin: PR c++/39639
// { dg-do compile }
// { dg-options "-std=c++0x" }
+// { dg-prune-output "template argument 1 is invalid" }
template <class... Types>
struct S
--- /dev/null
+// PR c++/47220
+// { dg-do compile { target c++11 } }
+
+template < typename ... > struct A;
+
+struct B : A < // { dg-error "invalid" }
+{
+};
{
template <typename T>
struct I : H <T> {};
- template <typename ...> struct J;
+ template <typename ...> struct J {};
template <typename> struct K;
struct L
{
template <typename T, typename B2, typename ... B4>
struct N <T (B4 ...), B2> : L::M <B2> {};
template <typename T, typename ... B4>
- struct K <T (B4 ...)> :J <,>, L
+ struct K <T (B4 ...)> :J <>, L
{
typedef T O (B4 ...);
struct P {};