pt.c (tsubst): Use template_parm_level_and_index.
2007-10-12 Paolo Carlini <pcarlini@suse.de> * pt.c (tsubst): Use template_parm_level_and_index. From-SVN: r129257
This commit is contained in:
parent
10372bd499
commit
f42054423c
|
@ -1,3 +1,7 @@
|
||||||
|
2007-10-12 Paolo Carlini <pcarlini@suse.de>
|
||||||
|
|
||||||
|
* pt.c (tsubst): Use template_parm_level_and_index.
|
||||||
|
|
||||||
2007-10-12 Jakub Jelinek <jakub@redhat.com>
|
2007-10-12 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR c++/32121
|
PR c++/32121
|
||||||
|
|
13
gcc/cp/pt.c
13
gcc/cp/pt.c
|
@ -8669,18 +8669,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
|
||||||
r = NULL_TREE;
|
r = NULL_TREE;
|
||||||
|
|
||||||
gcc_assert (TREE_VEC_LENGTH (args) > 0);
|
gcc_assert (TREE_VEC_LENGTH (args) > 0);
|
||||||
if (TREE_CODE (t) == TEMPLATE_TYPE_PARM
|
template_parm_level_and_index (t, &level, &idx);
|
||||||
|| TREE_CODE (t) == TEMPLATE_TEMPLATE_PARM
|
|
||||||
|| TREE_CODE (t) == BOUND_TEMPLATE_TEMPLATE_PARM)
|
|
||||||
{
|
|
||||||
idx = TEMPLATE_TYPE_IDX (t);
|
|
||||||
level = TEMPLATE_TYPE_LEVEL (t);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
idx = TEMPLATE_PARM_IDX (t);
|
|
||||||
level = TEMPLATE_PARM_LEVEL (t);
|
|
||||||
}
|
|
||||||
|
|
||||||
levels = TMPL_ARGS_DEPTH (args);
|
levels = TMPL_ARGS_DEPTH (args);
|
||||||
if (level <= levels)
|
if (level <= levels)
|
||||||
|
|
Loading…
Reference in New Issue