+2014-12-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/63522
+ * parser.c (cp_parser_type_parameter): Call
+ check_for_bare_parameter_packs on default argument.
+
2014-12-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/63985
"default arguments");
default_argument = NULL_TREE;
}
+ else if (check_for_bare_parameter_packs (default_argument))
+ default_argument = error_mark_node;
pop_deferring_access_checks ();
}
else
--- /dev/null
+// PR c++/63522
+// { dg-do compile { target c++11 } }
+
+template <typename...> struct tuple;
+template <typename...> void slice();
+template <int Index, typename...> using slice_result = decltype(slice<Index>);
+template <typename Tuple, typename... Tuples, int... ElementIndices,
+ typename =
+ typename tuple<slice_result<ElementIndices, Tuples...>,
+ slice_result<ElementIndices, Tuples...>...>::type> // { dg-error "parameter pack" }
+void zip_with(Tuple...);
+decltype(zip_with(0)) d; // { dg-error "no match" }
// { dg-do compile { target c++11 } }
-template<typename... T, typename = T> struct A {}; // { dg-error "must be at the end" }
+template<typename... T, typename = T> struct A {}; // { dg-error "parameter pack" }
-template<template<typename... T, typename = T> class U> struct B // { dg-error "must be at the end" }
+template<template<typename... T, typename = T> class U> struct B // { dg-error "parameter pack" }
{
- template<int> U<int> foo(); // { dg-error "mismatch|constant|invalid|invalid" }
+ template<int> U<int> foo(); // { dg-error "mismatch|constant|wrong|invalid" }
};