Commit 2077e863 by Jason Merrill Committed by Jason Merrill

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
parent 8d9eb114
1998-07-15 Jason Merrill <jason@yorick.cygnus.com> 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. * method.c (build_decl_overload_real): Fix namespace handling.
* typeck.c (build_unary_op): Extract a lone function from an * typeck.c (build_unary_op): Extract a lone function from an
......
...@@ -484,18 +484,21 @@ complete_template_args (tmpl, extra_args, unbound_only) ...@@ -484,18 +484,21 @@ complete_template_args (tmpl, extra_args, unbound_only)
template class, so skip over it. */ template class, so skip over it. */
skip = (! is_member_template (tmpl)); skip = (! is_member_template (tmpl));
type = DECL_REAL_CONTEXT (tmpl); if (depth > skip)
for (i = depth; i; type = TYPE_CONTEXT (type)) {
if (PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (type))) type = DECL_REAL_CONTEXT (tmpl);
{ for (i = depth; i; type = TYPE_CONTEXT (type))
if (skip) if (PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (type)))
skip = 0;
else
{ {
--i; if (skip)
TREE_VEC_ELT (new_args, i) = CLASSTYPE_TI_ARGS (type); skip = 0;
else
{
--i;
TREE_VEC_ELT (new_args, i) = CLASSTYPE_TI_ARGS (type);
}
} }
} }
} }
if (extra_arg_depth == 1) if (extra_arg_depth == 1)
......
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