pt.c (complete_template_args): Don't look at the context unless we have to.
* pt.c (complete_template_args): Don't look at the context unless we have to. From-SVN: r21195
This commit is contained in:
parent
8d9eb1141f
commit
2077e863e2
2 changed files with 16 additions and 10 deletions
|
@ -1,5 +1,8 @@
|
|||
1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* pt.c (complete_template_args): Don't look at the context unless
|
||||
we have too.
|
||||
|
||||
* method.c (build_decl_overload_real): Fix namespace handling.
|
||||
|
||||
* typeck.c (build_unary_op): Extract a lone function from an
|
||||
|
|
23
gcc/cp/pt.c
23
gcc/cp/pt.c
|
@ -484,18 +484,21 @@ complete_template_args (tmpl, extra_args, unbound_only)
|
|||
template class, so skip over it. */
|
||||
skip = (! is_member_template (tmpl));
|
||||
|
||||
type = DECL_REAL_CONTEXT (tmpl);
|
||||
for (i = depth; i; type = TYPE_CONTEXT (type))
|
||||
if (PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (type)))
|
||||
{
|
||||
if (skip)
|
||||
skip = 0;
|
||||
else
|
||||
if (depth > skip)
|
||||
{
|
||||
type = DECL_REAL_CONTEXT (tmpl);
|
||||
for (i = depth; i; type = TYPE_CONTEXT (type))
|
||||
if (PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (type)))
|
||||
{
|
||||
--i;
|
||||
TREE_VEC_ELT (new_args, i) = CLASSTYPE_TI_ARGS (type);
|
||||
if (skip)
|
||||
skip = 0;
|
||||
else
|
||||
{
|
||||
--i;
|
||||
TREE_VEC_ELT (new_args, i) = CLASSTYPE_TI_ARGS (type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (extra_arg_depth == 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue