@@ -8715,8 +8715,7 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
{
tree expansion = TREE_VEC_ELT (ARGUMENT_PACK_ARGS (arg_pack), 0);
tree pattern = PACK_EXPANSION_PATTERN (expansion);
- if ((TYPE_P (pattern) && same_type_p (pattern, parm_pack))
- || (!TYPE_P (pattern) && cp_tree_equal (parm_pack, pattern)))
+ if (template_parameter_pack_p (pattern))
/* The argument pack that the parameter maps to is just an
expansion of the parameter itself, such as one would
find in the implicit typedef of a class inside the