Commit 9524f710 by Larry Evans Committed by Jason Merrill

re PR c++/40092 ([c++0x] expansion pattern fails with error about derived…

re PR c++/40092 ([c++0x] expansion pattern fails with error about derived template instead of actual template)

	PR c++/40092
	* tree.c (cp_tree_equal): Add test for TEMPLATE_PARM_PARAMETER_PACK
	equality.

From-SVN: r152751
parent a743523c
2009-10-14 Larry Evans <cppljevans@suddenlink.net>
PR c++/40092
* tree.c (cp_tree_equal): Add test for TEMPLATE_PARM_PARAMETER_PACK
equality.
2009-10-12 Jason Merrill <jason@redhat.com>
PR c++/37875
......
......@@ -2081,6 +2081,8 @@ cp_tree_equal (tree t1, tree t2)
case TEMPLATE_PARM_INDEX:
return (TEMPLATE_PARM_IDX (t1) == TEMPLATE_PARM_IDX (t2)
&& TEMPLATE_PARM_LEVEL (t1) == TEMPLATE_PARM_LEVEL (t2)
&& (TEMPLATE_PARM_PARAMETER_PACK (t1)
== TEMPLATE_PARM_PARAMETER_PACK (t2))
&& same_type_p (TREE_TYPE (TEMPLATE_PARM_DECL (t1)),
TREE_TYPE (TEMPLATE_PARM_DECL (t2))));
......
2009-10-14 Larry Evans <cppljevans@suddenlink.net>
* g++.dg/cpp0x/vt-40092.C: New.
2009-10-14 Alexandre Oliva <aoliva@redhat.com>
* gcc.dg/guality/pr41616-1.c: Drop -O2.
......
// { dg-do "compile" }
// { dg-options "-std=c++0x" }
template <typename... Types> struct package {};
template <int ArgGen> struct wrapper_gen {};
template <int ArgNest> struct wrapper_nest
{
typedef wrapper_gen<ArgNest> type_nest;
};
template <int... ArgPack>
struct wrapper_pack
{
typedef package<wrapper_gen <ArgPack>...> type_pack;
// incorrect error: expansion pattern 'wrapper_gen<ArgNest>'
// contains no argument packs
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment